Esempio n. 1
0
 public TypeSerializers(ITypeNameMapper typeNameMapper = null, TypeSerializersOptions options = null)
 {
     ConvertorGenerator = new DefaultTypeConvertorGenerator();
     SetTypeNameMapper(typeNameMapper);
     ForgotAllTypesAndSerializers();
     _newSimpleSaverAction            = NewSimpleSaver;
     _newComplexSaverAction           = NewComplexSaver;
     _newDescriptorSaverFactoryAction = NewDescriptorSaverFactory;
     _loaderFactoryAction             = LoaderFactory;
     _buildFromTypeAction             = BuildFromType;
     _options = options ?? TypeSerializersOptions.Default;
 }
Esempio n. 2
0
 public TypeSerializers(ITypeNameMapper?typeNameMapper = null, TypeSerializersOptions?options = null)
 {
     ConvertorGenerator = DefaultTypeConvertorGenerator.Instance;
     SetTypeNameMapper(typeNameMapper);
     ForgotAllTypesAndSerializers();
     _newSimpleSaverAction            = NewSimpleSaver;
     _newComplexSaverAction           = NewComplexSaver;
     _newDescriptorSaverFactoryAction = NewDescriptorSaverFactory;
     _loaderFactoryAction             = LoaderFactory;
     _buildFromTypeAction             = BuildFromType;
     _options         = options ?? TypeSerializersOptions.Default;
     _symmetricCipher = _options.SymmetricCipher ?? new InvalidSymmetricCipher();
 }