Esempio n. 1
0
        public DataContractSerializer(ITypeProvider typeProvider)
        {
            var dataContractResolver = new NimbusDataContractResolver(typeProvider);

            _settings = new DataContractSerializerSettings
                        {
                            DataContractResolver = dataContractResolver,
                            SerializeReadOnlyTypes = true,
                            MaxItemsInObjectGraph = int.MaxValue,
                            KnownTypes = typeProvider.AllSerializableTypes()
                        };
        }
Esempio n. 2
0
        public DataContractSerializer(ITypeProvider typeProvider)
        {
            var dataContractResolver = new NimbusDataContractResolver(typeProvider);

            _settings = new DataContractSerializerSettings
            {
                DataContractResolver   = dataContractResolver,
                SerializeReadOnlyTypes = true,
                MaxItemsInObjectGraph  = int.MaxValue,
                KnownTypes             = typeProvider.AllSerializableTypes()
            };
        }