File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 <PackageVersion Include =" Microsoft.SourceLink.AzureRepos.Git" Version =" 8.0.0" />
88 <PackageVersion Include =" Microsoft.Testing.Extensions.CodeCoverage" Version =" 18.3.2" />
99 <PackageVersion Include =" Microsoft.Testing.Extensions.TrxReport" Version =" 2.0.2" />
10+ <PackageVersion Include =" ktsu.RoundTripStringJsonConverter" Version =" 1.0.7" />
1011 <PackageVersion Include =" Polyfill" Version =" 9.8.1" />
1112 <PackageVersion Include =" System.Memory" Version =" 4.6.3" />
1213 </ItemGroup >
Original file line number Diff line number Diff line change @@ -10,13 +10,16 @@ namespace ktsu.Semantics.Strings;
1010using System . Diagnostics . CodeAnalysis ;
1111using System . Globalization ;
1212using System . Text ;
13+ using System . Text . Json . Serialization ;
14+
15+ using ktsu . RoundTripStringJsonConverter ;
1316
1417/// <summary>
1518/// Base class for all semantic string types using CRTP (Curiously Recurring Template Pattern).
1619/// Provides type safety and validation for string values that have specific meaning or format requirements.
1720/// </summary>
1821[ DebuggerDisplay ( value : $ "{{{nameof(GetDebuggerDisplay)}(),nq}}") ]
19-
22+ [ JsonConverter ( typeof ( RoundTripStringJsonConverterFactory ) ) ]
2023public abstract record SemanticString < TDerived > : ISemanticString
2124 where TDerived : SemanticString < TDerived >
2225{
Original file line number Diff line number Diff line change 1010 <!-- IDE0057: Substring can be simplified -->
1111 </PropertyGroup >
1212 <ItemGroup >
13+ <PackageReference Include =" ktsu.RoundTripStringJsonConverter" />
1314 <PackageReference Include =" Polyfill" />
1415 <PackageReference Include =" System.Memory" Condition =" '$(TargetFramework)' == 'netstandard2.0'" />
1516 </ItemGroup >
You can’t perform that action at this time.
0 commit comments