Skip to content

Commit 5ea98c9

Browse files
committed
Applied IKeyedTopicViewModel to ITopicViewModel
Since `Key` is now defined on both `ITopicBindingModel` and the new `IKeyedTopicViewModel` (565273f), and there's no other "pollution" from any otherwise unnecessary interface requirements on `IKeyedTopicViewModel`, we can derive `ITopicBindingModel` from `IKeyedTopicViewModel`, thus allowing them to share this definition, while also allowing implementations to satisfy both interfaces.
1 parent 3b5dda8 commit 5ea98c9

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

OnTopic/Models/ITopicViewModel.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace OnTopic.Models {
2828
/// presentation layer and any supporting libraries.
2929
/// </para>
3030
/// </remarks>
31-
public interface ITopicViewModel {
31+
public interface ITopicViewModel: IKeyedTopicViewModel {
3232

3333
/*==========================================================================================================================
3434
| PROPERTY: ID
@@ -38,14 +38,6 @@ public interface ITopicViewModel {
3838
/// </summary>
3939
int Id { get; init; }
4040

41-
/*==========================================================================================================================
42-
| PROPERTY: KEY
43-
\-------------------------------------------------------------------------------------------------------------------------*/
44-
/// <summary>
45-
/// Gets or sets the topic's Key attribute, the primary text identifier for the topic.
46-
/// </summary>
47-
string? Key { get; init; }
48-
4941
/*==========================================================================================================================
5042
| PROPERTY: UNIQUE KEY
5143
\-------------------------------------------------------------------------------------------------------------------------*/
@@ -105,7 +97,7 @@ public interface ITopicViewModel {
10597
/// Gets or sets the Title attribute, which represents the friendly name of the topic.
10698
/// </summary>
10799
/// <remarks>
108-
/// While the <see cref="ITopicViewModel.Key"/> may not contain, for instance, spaces or symbols, there are no
100+
/// While the <see cref="IKeyedTopicViewModel.Key"/> may not contain, for instance, spaces or symbols, there are no
109101
/// restrictions on what characters can be used in the title. For this reason, it provides the default public value for
110102
/// referencing topics.
111103
/// </remarks>

0 commit comments

Comments
 (0)