Modular Database Upgrade
CultCache API can now be configured with multiple interchangeable backing stores. Will be using plain JSON in repository from now on.
This commit is contained in:
parent
00f752edf7
commit
85483319fe
158 changed files with 658 additions and 290 deletions
|
|
@ -3,6 +3,8 @@ using System.Collections.Generic;
|
|||
using MessagePack;
|
||||
using MessagePack.ReactivePropertyExtension;
|
||||
using MessagePack.Resolvers;
|
||||
using Newtonsoft.Json;
|
||||
using RethinkDb.Driver.Net;
|
||||
|
||||
public static class RegisterResolver
|
||||
{
|
||||
|
|
@ -22,6 +24,19 @@ public static class RegisterResolver
|
|||
var options = MessagePackSerializerOptions.Standard.WithResolver(resolver);
|
||||
MessagePackSerializer.DefaultOptions = options;
|
||||
|
||||
// Add Unity.Mathematics serialization support to Newtonsoft JSON
|
||||
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
|
||||
{
|
||||
Converters = new List<JsonConverter>
|
||||
{
|
||||
new MathJsonConverter(),
|
||||
Converter.DateTimeConverter,
|
||||
Converter.BinaryConverter,
|
||||
Converter.GroupingConverter,
|
||||
Converter.PocoExprConverter
|
||||
}
|
||||
};
|
||||
|
||||
registered = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue