Skip to content

Commit 3b5dda8

Browse files
committed
Applied IKeyedTopicViewModel to ITopicBindingModel
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 565273f commit 3b5dda8

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

OnTopic/Models/ITopicBindingModel.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,7 @@ namespace OnTopic.Models {
1919
/// It is strictly required that topic binding models implement the <see cref="ITopicBindingModel"/> interface for the
2020
/// default <see cref="ReverseTopicMappingService"/> to correctly identify and map a binding model to a <see cref="Topic"/>.
2121
/// </remarks>
22-
public interface ITopicBindingModel {
23-
24-
/*==========================================================================================================================
25-
| PROPERTY: KEY
26-
\-------------------------------------------------------------------------------------------------------------------------*/
27-
/// <summary>
28-
/// Gets or sets the topic's Key attribute, the primary text identifier for the topic.
29-
/// </summary>
30-
/// <requires description="The value from the getter must not be null." exception="T:System.ArgumentNullException">
31-
/// value is not null
32-
/// </requires>
33-
/// <requires
34-
/// description="The Key should be an alphanumeric sequence; it should not contain spaces or symbols."
35-
/// exception="T:System.ArgumentException">
36-
/// !value.Contains(" ")
37-
/// </requires>
38-
[Required]
39-
string? Key { get; init; }
22+
public interface ITopicBindingModel: IKeyedTopicViewModel {
4023

4124
/*==========================================================================================================================
4225
| PROPERTY: CONTENT TYPE

0 commit comments

Comments
 (0)