/// <summary> /// Initializes a new instance of the <see cref="SerializerContext"/> class. /// </summary> /// <param name="serializer">The serializer.</param> internal SerializerContext(Serializer serializer) { Serializer = serializer; settings = serializer.Settings; tagTypeRegistry = settings.AssemblyRegistry; ObjectFactory = settings.ObjectFactory; ObjectSerializerBackend = settings.ObjectSerializerBackend; Schema = Settings.Schema; ObjectSerializer = serializer.ObjectSerializer; typeDescriptorFactory = serializer.TypeDescriptorFactory; }
/// <summary> /// Initializes a new instance of the <see cref="SerializerContext"/> class. /// </summary> /// <param name="serializer">The serializer.</param> internal SerializerContext(Serializer serializer) { Serializer = serializer; settings = serializer.Settings; tagTypeRegistry = settings.AssemblyRegistry; ObjectFactory = settings.ObjectFactory; ObjectSerializerBackend = settings.ObjectSerializerBackend; Schema = Settings.Schema; ObjectSerializer = serializer.ObjectSerializer; typeDescriptorFactory = serializer.TypeDescriptorFactory; }
/// <summary> /// Initializes a new instance of the <see cref="SerializerContext"/> class. /// </summary> /// <param name="serializer">The serializer.</param> internal SerializerContext(Serializer serializer) { Serializer = serializer; settings = serializer.Settings; tagTypeRegistry = settings.tagTypeRegistry; ObjectFactory = settings.ObjectFactory; ObjectSerializerBackend = settings.ObjectSerializerBackend; Schema = Settings.Schema; typeDescriptorFactory = new TypeDescriptorFactory(Settings.Attributes, Settings.EmitDefaultValues); }