public SerializationRegistry(CborOptions options)
 {
     ConverterRegistry               = new CborConverterRegistry(options);
     ObjectMappingRegistry           = new ObjectMappingRegistry(this);
     ObjectMappingConventionRegistry = new ObjectMappingConventionRegistry();
     DiscriminatorConventionRegistry = new DiscriminatorConventionRegistry(this);
 }
Example #2
0
 public MemberMapping(CborConverterRegistry converterRegistry,
                      IObjectMapping objectMapping, MemberInfo memberInfo, Type memberType)
 {
     _objectMapping     = objectMapping;
     _converterRegistry = converterRegistry;
     MemberInfo         = memberInfo;
     MemberType         = memberType;
     MemberName         = null;
     DefaultValue       = (memberType.IsClass || memberType.IsInterface) ? null : Activator.CreateInstance(memberType);
 }