Exemple #1
0
        public JsonDomainEventSerializer(string virtualNamespaceName)
        {
            _binder = new TypeAliasBinder(virtualNamespaceName);

            Settings = new JsonSerializerSettings
            {
                ContractResolver = new ContractResolver(),
                Binder           = _binder.AddType(typeof(Metadata)),
                TypeNameHandling = TypeNameHandling.Objects,
                Formatting       = Formatting.Indented,
            };
        }
        public JsonDomainEventSerializer(string virtualNamespaceName)
        {
            _binder = new TypeAliasBinder(virtualNamespaceName);

            Settings = new JsonSerializerSettings
            {
                ContractResolver = new ContractResolver(),
                Binder = _binder.AddType(typeof(Metadata)),
                TypeNameHandling = TypeNameHandling.Objects,
                Formatting = Formatting.Indented,
            };
        }
        public JsonDomainEventSerializer(string virtualNamespaceName)
        {
            _binder = new TypeAliasBinder(virtualNamespaceName);

            Settings = new JsonSerializerSettings {
                ContractResolver    = new ContractResolver(),
                Binder              = _binder.AddType(typeof(Metadata)),
                TypeNameHandling    = TypeNameHandling.Objects,
                Formatting          = Formatting.Indented,
                FloatFormatHandling = FloatFormatHandling.DefaultValue,
                FloatParseHandling  = FloatParseHandling.Decimal,
                Converters          = new List <JsonConverter> {
                    new CustomDecimalJsonConverter()
                }
            };
        }