Skip to content

Commit b67e87f

Browse files
committed
Renamed TranslateTopicPointers to TranslateLegacyTopicReferences
The terminology for "topic pointers" was standardized as "topic references"—and what the `ExportOptions` refers to as `TopicPointers` are no longer the preferred method of modeling topic references. To help unify the vocabulary, while simultaneously clarifying that this is for legacy support, I've renamed this option to `TranslateLegacyTopicReferences`.
1 parent 02cc7e0 commit b67e87f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

OnTopic.Data.Transfer/Interchange/ExportOptions.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6+
using System;
67
using System.Diagnostics.CodeAnalysis;
78

89
namespace OnTopic.Data.Transfer.Interchange {
@@ -96,10 +97,10 @@ public bool IncludeNestedTopics {
9697
public bool IncludeChildTopics { get; set; }
9798

9899
/*==========================================================================================================================
99-
| TRANSLATE TOPIC POINTERS
100+
| TRANSLATE LEGACY TOPIC REFERENCES
100101
\-------------------------------------------------------------------------------------------------------------------------*/
101102
/// <summary>
102-
/// Determines whether attributes that appear to be topic pointers should be mapped to their fully qualified unique key.
103+
/// Determines whether attributes that appear to be topic reference should be mapped to its fully qualified unique key.
103104
/// </summary>
104105
/// <remarks>
105106
/// <para>
@@ -129,6 +130,9 @@ public bool IncludeNestedTopics {
129130
/// enabled when it's known to be necessary to maintain backward compatibility.
130131
/// </para>
131132
/// </remarks>
133+
public bool TranslateLegacyTopicReferences { get; set; }
134+
135+
[Obsolete("The TranslateTopicPointers option has been renamed to TranslateLegacyTopicReferences", true)]
132136
public bool TranslateTopicPointers { get; set; }
133137

134138
} //Class

OnTopic.Data.Transfer/Interchange/TopicExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ childTopic.ContentType is "List"
163163
| Get attribute value
164164
\-----------------------------------------------------------------------------------------------------------------------*/
165165
string? getAttributeValue(AttributeRecord attribute) =>
166-
options.TranslateTopicPointers && attribute.Key.EndsWith("ID", StringComparison.InvariantCultureIgnoreCase)?
166+
options.TranslateLegacyTopicReferences && attribute.Key.EndsWith("ID", StringComparison.InvariantCultureIgnoreCase)?
167167
GetUniqueKey(topic, attribute.Value, options) :
168168
attribute.Value;
169169

@@ -465,9 +465,9 @@ bool useCustomMergeRules(AttributeData attribute) =>
465465
/// </summary>
466466
/// <remarks>
467467
/// Note that this function is <i>exclusively</i> required for maintaining backward compatibility the <see cref="
468-
/// ExportOptions.TranslateTopicPointers"/> option/ With the release of OnTopic 5.0.0, and OnTopic Data Transfer 3.0.0,
469-
/// implementers should prefer the use of <see cref="Topic.References"/>. The <see cref="GetUniqueKey(Topic, String?,
470-
/// ExportOptions)"/> method continues to be included primarily for backward compatibility with legacy database
468+
/// ExportOptions.TranslateLegacyTopicReferences"/> option/ With the release of OnTopic 5.0.0, and OnTopic Data Transfer
469+
/// 3.0.0, implementers should prefer the use of <see cref="Topic.References"/>. The <see cref="GetUniqueKey(Topic,
470+
/// String?, ExportOptions)"/> method continues to be included primarily for backward compatibility with legacy database
471471
/// configurations.
472472
/// </remarks>
473473
/// <param name="topic">The source <see cref="Topic"/> to operate off of.</param>

0 commit comments

Comments
 (0)