예제 #1
0
        internal DataContractSerializer(Type type, string rootName, string rootNamespace, IEnumerable <Type>?knownTypes, int maxItemsInObjectGraph,
                                        bool ignoreExtensionDataObject, bool preserveObjectReferences)
        {
            XmlDictionary dictionary = new XmlDictionary(2);

            Initialize(type, dictionary.Add(rootName), dictionary.Add(DataContract.GetNamespace(rootNamespace)), knownTypes, int.MaxValue, ignoreExtensionDataObject, preserveObjectReferences, null, false);
        }
        public NetDataContractSerializer(string rootName, string rootNamespace,
                                         StreamingContext context,
                                         int maxItemsInObjectGraph,
                                         bool ignoreExtensionDataObject,
                                         FormatterAssemblyStyle assemblyFormat,
                                         ISurrogateSelector surrogateSelector)
        {
            XmlDictionary dictionary = new XmlDictionary(2);

            Initialize(dictionary.Add(rootName), dictionary.Add(DataContract.GetNamespace(rootNamespace)), context, maxItemsInObjectGraph, ignoreExtensionDataObject, assemblyFormat, surrogateSelector);
        }
예제 #3
0
        public DataContractSerializer(Type type, string rootName, string rootNamespace,
                                      IEnumerable <Type> knownTypes,
                                      int maxItemsInObjectGraph,
                                      bool ignoreExtensionDataObject,
                                      bool preserveObjectReferences,
                                      IDataContractSurrogate dataContractSurrogate,
                                      DataContractResolver dataContractResolver)
        {
            XmlDictionary dictionary = new XmlDictionary(2);

            Initialize(type, dictionary.Add(rootName), dictionary.Add(DataContract.GetNamespace(rootNamespace)), knownTypes, maxItemsInObjectGraph, ignoreExtensionDataObject, preserveObjectReferences, dataContractSurrogate, dataContractResolver, false);
        }
        public DataContractSerializer(Type type, string rootName, string rootNamespace, IEnumerable <Type> knownTypes)
        {
            XmlDictionary dictionary = new XmlDictionary(2);

            Initialize(type, dictionary.Add(rootName), dictionary.Add(DataContract.GetNamespace(rootNamespace)), knownTypes, int.MaxValue, false, false, null, false);
        }