Akka.Serialization.NewtonSoftJsonSerializer.NewtonSoftJsonSerializer C# (CSharp) Метод

NewtonSoftJsonSerializer() публичный Метод

Initializes a new instance of the NewtonSoftJsonSerializer class.
public NewtonSoftJsonSerializer ( ExtendedActorSystem system ) : System
system ExtendedActorSystem The actor system to associate with this serializer.
Результат System
        public NewtonSoftJsonSerializer(ExtendedActorSystem system)
            : base(system)
        {
            _settings = new JsonSerializerSettings
            {
                PreserveReferencesHandling = PreserveReferencesHandling.Objects,
                Converters = new List<JsonConverter> { new SurrogateConverter(this),new DiscriminatedUnionConverter()},
                NullValueHandling = NullValueHandling.Ignore,
                DefaultValueHandling = DefaultValueHandling.Ignore,
                MissingMemberHandling = MissingMemberHandling.Ignore,
                ObjectCreationHandling = ObjectCreationHandling.Replace, //important: if reuse, the serializer will overwrite properties in default references, e.g. Props.DefaultDeploy or Props.noArgs
                ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor,
                TypeNameHandling = TypeNameHandling.All,
                ContractResolver = new AkkaContractResolver(),
            };

            _serializer = JsonSerializer.Create(_settings);
        }