public static Task Set <T>(this IKeyValueStore keyValueStore, string key, T value, Moment?expiresAt, CancellationToken cancellationToken = default) { var sValue = NewtonsoftJsonSerialized.New(value).Data; return(keyValueStore.Set(key, sValue, expiresAt, cancellationToken)); }
public NewtonsoftJsonSerializedToStringValueConverter(ConverterMappingHints?mappingHints = null) : base( v => v.Data, v => NewtonsoftJsonSerialized.New <T>(v), mappingHints) { }
public static T PassThroughSystemJsonSerialized <T>(this T value, ITestOutputHelper?output = null) { var v1 = SystemJsonSerialized.New(value); output?.WriteLine($"SystemJsonSerialized: {v1.Data}"); var v2 = NewtonsoftJsonSerialized.New <T>(v1.Data); return(v2.Value); }
protected virtual string Serialize(PluginSetInfo source) => NewtonsoftJsonSerialized.New(source).Data;