OnTopic Data Transfer 2.0.0 is a major release primarily focused on support for OnTopic 5.0.0's new topic references feature. It includes changes to the JSON serialization format—though it also maintains backward compatibility with the legacy format.
New Features
General
- Topic References: Full integration of OnTopic 5.0.0's new topic references feature, including support for
BaseTopic
and merging topic references based onLastModified
(2cfbc52, d0cb983). - Resolve Associations: The
Import()
now tracks any associations that it is not able to resolve and attempts to resolve them after the initialImport()
has completed, thus accounting for associations to topics that weren't yet imported because they occur later in the interchange data (4a75ff6). This prevents the need for callingImport()
twice to ensure that there aren't any unresolved associations.
NuGet Package
- SourceLink: Configured
SourceLink
with references to GitHub commits so that packages can be properly debugged by implementers (8e1a5cc). - IntelliSense: The NuGet packages now include the XML documentation, thus allowing implementers to benefit from IntelliSense annotations in Visual Studio (cbc66d4).
- Icon: Added icon to NuGet packages to make them easier to recognize, and consistently branded (d65a81a).
Breaking Changes
The following changes impact the interchange format, but maintain backward compatibility for derserializing legacy JSON files.
DerivedTopicKey
: MarkedDerivedTopicKey
as deprecated, and no longer write it duringExport()
(4705b29, 6c33fb8).AttributeData(Collection)
: RenamedAttributeData
toRecordData
andAttributeDataCollection
toRecordDataCollection
to maintain parity with theTrackedRecord(Collection)
in OnTopic, and to provide base support for both attributes as well as topic references (a5df9b1).RelationshipData(Collection)
: RenamedRelationshipData
toKeyValuesPair
andRelationshipDataCollection
toMultiMap
to maintain parity with theKeyValuesPair<T>
andTopicRelationshipMultiMap
in OnTopic (bc15631). The JSON now writes toRelationships: [{ …, Values: […]}]
instead ofRelationships: [{ …, Relationships: […]}]
.
Code Improvements
- OnTopic Library: Updated to OnTopic 5.0.0, with accommodations for breaking changes, such as the rename of
Topic.DerivedTopic
toBaseTopic
andTopic.Relationships.SetTopic()
toSetValue()
(2f75a73). - JSON (De)Serialization: Updated to
System.Json.Text
5.0.0, which allows us to take advantage of .NET 5 annotations, such as[JsonInclude]
and[JsonIgnore()]
, while maintaining compatibility with .NET Core 3.x (439b41c). - Code Analysis: Implemented the latest version of Microsoft's code analysis library (
NetAnalyzers
), as well as the feedback it exposed, including nullable reference annotations (7fa983c).