/// <summary> /// Creates an instead of serializer settings with default values /// </summary> public SerializerSettings() { OutputTypeInformation = true; IgnoredPropertyAction = IgnoredPropertyOption.ThrowException; MissingPropertyAction = MissingPropertyOptions.Ignore; ReferenceWritingType = ReferenceOption.ErrorCircularReferences; DefaultValueSetting = DefaultValueOption.WriteAllValues; TypeAliases = new TypeAliasCollection(); // collections CollectionHandlers = new List <CollectionHandler>(); CollectionHandlers.Add(new GenericCollectionHandler()); CollectionHandlers.Add(new ArrayHandler()); CollectionHandlers.Add(new ListHandler()); CollectionHandlers.Add(new StackHandler()); CollectionHandlers.Add(new GenericStackHandler()); CollectionHandlers.Add(new CollectionConstructorHandler()); // type handlers Types = new TypeDataRepository(this); Parameters = new Hashtable(); // type conversion Types.RegisterTypeConverter(typeof(System.Collections.BitArray), new BitArrayConverter()); ExpressionHandlers = new ExpressionHandlerCollection(this); DefaultValues = new DefaultValueCollection(); }
/// <summary> /// Constructs a DefaultValueCollection with a parent collection /// </summary> public DefaultValueCollection(DefaultValueCollection parent) { this.parent = parent; }