-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathIAssociatedTopicBindingModel.cs
37 lines (33 loc) · 1.95 KB
/
IAssociatedTopicBindingModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*==============================================================================================================================
| Author Ignia, LLC
| Client Ignia, LLC
| Project Topics Library
\=============================================================================================================================*/
using System.ComponentModel.DataAnnotations;
using OnTopic.Mapping.Reverse;
namespace OnTopic.Models {
/*============================================================================================================================
| INTERFACE: ASSOCIATED TOPIC BINDING MODEL
\---------------------------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Provides a generic data transfer topic for binding an association of a binding model to an existing <see cref="Topic"/>.
/// </summary>
/// <remarks>
/// It is strictly required that any binding models used as associations implement the <see cref="
/// IAssociatedTopicBindingModel"/> interface for the default <see cref="ReverseTopicMappingService"/> to correctly identify
/// and map an association back to a <see cref="Topic"/>.
/// </remarks>
public interface IAssociatedTopicBindingModel {
/*==========================================================================================================================
| PROPERTY: UNIQUE KEY
\-------------------------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Gets or sets the topic's <see cref="UniqueKey"/> attribute, the unique text identifier for the topic.
/// </summary>
/// <requires description="The value from the getter must not be null." exception="T:System.ArgumentNullException">
/// value is not null
/// </requires>
[Required, NotNull, DisallowNull]
string? UniqueKey { get; init; }
} //Class
} //Namespace