Skip to content

Commit 2067aa7

Browse files
committed
Added InstructionAttribute
This is in preparation of introducing a new attribute type—`IncomingRelationshipAttribute`—to the editor. In the future, we'd prefer for these to be managed via the editor itself, but for now this interdependency remains.
1 parent f32054e commit 2067aa7

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

OnTopic/DefaultTopicLookupService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public DefaultTopicLookupService(IEnumerable<Type>? types = null, Type? defaultT
4545
TryAdd(typeof(FileListAttribute));
4646
TryAdd(typeof(FilePathAttribute));
4747
TryAdd(typeof(HtmlAttribute));
48+
TryAdd(typeof(IncomingRelationshipAttribute));
4849
TryAdd(typeof(InstructionAttribute));
4950
TryAdd(typeof(LastModifiedAttribute));
5051
TryAdd(typeof(LastModifiedByAttribute));
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*==============================================================================================================================
2+
| Author Ignia, LLC
3+
| Client Ignia, LLC
4+
| Project Topics Library
5+
\=============================================================================================================================*/
6+
7+
namespace OnTopic.Metadata.AttributeTypes {
8+
9+
/*============================================================================================================================
10+
| CLASS: INCOMING RELATIONSHIP ATTRIBUTE (DESCRIPTOR)
11+
\---------------------------------------------------------------------------------------------------------------------------*/
12+
/// <summary>
13+
/// Represents metadata for describing an incoming relationship attribute type, including information on how it will be
14+
/// presented and validated in the editor.
15+
/// </summary>
16+
/// <remarks>
17+
/// This class is primarily used by the Topic Editor interface to determine how attributes are displayed as part of the
18+
/// CMS; except in very specific scenarios, it is not typically used elsewhere in the Topic Library itself.
19+
/// </remarks>
20+
public class IncomingRelationshipAttribute : AttributeTypeDescriptor {
21+
22+
/*==========================================================================================================================
23+
| CONSTRUCTOR
24+
\-------------------------------------------------------------------------------------------------------------------------*/
25+
/// <inheritdoc />
26+
public IncomingRelationshipAttribute(
27+
string key,
28+
string contentType,
29+
Topic parent,
30+
int id = -1
31+
) : base(
32+
key,
33+
contentType,
34+
parent,
35+
id
36+
) {
37+
}
38+
39+
} //Class
40+
} //Namespace

0 commit comments

Comments
 (0)