Beispiel #1
0
        public static void Reset()
        {
            foreach (var rawSerializeType in HasSerializeFn.ToArray())
            {
                Reset(rawSerializeType);
            }

            sModelFactory = ReflectionExtensions.GetConstructorMethodToCache;
            sTryToParsePrimitiveTypeValues          = null;
            sTryToParseNumericType                  = null;
            sConvertObjectTypesIntoStringDictionary = null;
            sIncludeNullValues = null;
            sIncludeNullValuesInDictionaries = null;
            sExcludeTypeInfo              = null;
            sEmitCamelCaseNames           = null;
            sEmitLowercaseUnderscoreNames = null;
            sDateHandler                 = null;
            sTimeSpanHandler             = null;
            sPreferInterfaces            = null;
            sThrowOnDeserializationError = null;
            sTypeAttr             = null;
            sJsonTypeAttrInObject = null;
            sJsvTypeAttrInObject  = null;
            sTypeWriter           = null;
            sTypeFinder           = null;
            sTreatEnumAsInteger   = null;
            sAlwaysUseUtc         = null;
            sAssumeUtc            = null;
            sAppendUtcOffset      = null;
            sEscapeUnicode        = null;
            sIncludePublicFields  = null;
            HasSerializeFn        = new HashSet <Type>();
            TreatValueAsRefTypes  = new HashSet <Type> {
                typeof(KeyValuePair <,>)
            };
            PropertyConvention         = JsonPropertyConvention.ExactMatch;
            sExcludePropertyReferences = null;
            sOnDeserializationError    = null;
        }
Beispiel #2
0
        public static void Reset()
        {
            foreach (var rawSerializeType in HasSerializeFn.ToArray())
            {
                Reset(rawSerializeType);
            }
            foreach (var rawSerializeType in HasIncludeDefaultValue.ToArray())
            {
                Reset(rawSerializeType);
            }
            foreach (var uniqueType in __uniqueTypes.ToArray())
            {
                Reset(uniqueType);
            }

            sModelFactory = ReflectionExtensions.GetConstructorMethodToCache;
            sTryToParsePrimitiveTypeValues = null;
            sTryToParseNumericType = null;
            sConvertObjectTypesIntoStringDictionary = null;
            sExcludeDefaultValues = null;
            sIncludeNullValues = null;
            sIncludeNullValuesInDictionaries = null;
            sExcludeTypeInfo = null;
            sEmitCamelCaseNames = null;
            sEmitLowercaseUnderscoreNames = null;
            sDateHandler = null;
            sTimeSpanHandler = null;
            sPreferInterfaces = null;
            sThrowOnDeserializationError = null;
            sTypeAttr = null;
            sJsonTypeAttrInObject = null;
            sJsvTypeAttrInObject = null;
            sTypeWriter = null;
            sTypeFinder = null;
            sParsePrimitiveFn = null;
            sTreatEnumAsInteger = null;
            sAlwaysUseUtc = null;
            sAssumeUtc = null;
            sSkipDateTimeConversion = null;
            sAppendUtcOffset = null;
            sEscapeUnicode = null;
            sOnDeserializationError = null;
            sIncludePublicFields = null;
            sReuseStringBuffer = null;
            HasSerializeFn = new HashSet<Type>();
            HasIncludeDefaultValue = new HashSet<Type>();
            TreatValueAsRefTypes = new HashSet<Type> { typeof(KeyValuePair<,>) };
            sPropertyConvention = null;
            sExcludePropertyReferences = null;
            sExcludeTypes = new HashSet<Type> { typeof(Stream) };
            __uniqueTypes = new HashSet<Type>();
            sMaxDepth = 50;
            sParsePrimitiveIntegerTypes = null;
            sParsePrimitiveFloatingPointTypes = null;
            PlatformExtensions.ClearRuntimeAttributes();
            ReflectionExtensions.Reset();
            JsState.Reset();
        }
Beispiel #3
0
        public static void Reset()
        {
            foreach (var rawSerializeType in HasSerializeFn.ToArray())
            {
                Reset(rawSerializeType);
            }
            foreach (var rawSerializeType in HasIncludeDefaultValue.ToArray())
            {
                Reset(rawSerializeType);
            }
            foreach (var uniqueType in __uniqueTypes.ToArray())
            {
                Reset(uniqueType);
            }

            sModelFactory = ReflectionExtensions.GetConstructorMethodToCache;
            sTryToParsePrimitiveTypeValues          = null;
            sTryToParseNumericType                  = null;
            sConvertObjectTypesIntoStringDictionary = null;
            sExcludeDefaultValues            = null;
            sIncludeNullValues               = null;
            sIncludeNullValuesInDictionaries = null;
            sExcludeTypeInfo              = null;
            sEmitCamelCaseNames           = null;
            sEmitLowercaseUnderscoreNames = null;
            sDateHandler                 = null;
            sTimeSpanHandler             = null;
            sPreferInterfaces            = null;
            sThrowOnDeserializationError = null;
            sTypeAttr               = null;
            sJsonTypeAttrInObject   = null;
            sJsvTypeAttrInObject    = null;
            sTypeWriter             = null;
            sTypeFinder             = null;
            sParsePrimitiveFn       = null;
            sTreatEnumAsInteger     = null;
            sAlwaysUseUtc           = null;
            sAssumeUtc              = null;
            sAppendUtcOffset        = null;
            sEscapeUnicode          = null;
            sOnDeserializationError = null;
            sIncludePublicFields    = null;
            sReuseStringBuffer      = null;
            HasSerializeFn          = new HashSet <Type>();
            HasIncludeDefaultValue  = new HashSet <Type>();
            TreatValueAsRefTypes    = new HashSet <Type> {
                typeof(KeyValuePair <,>)
            };
            sPropertyConvention        = null;
            sExcludePropertyReferences = null;
            sExcludeTypes = new HashSet <Type> {
                typeof(Stream)
            };
            __uniqueTypes = new HashSet <Type>();
            sMaxDepth     = 50;
            sParsePrimitiveIntegerTypes       = null;
            sParsePrimitiveFloatingPointTypes = null;
            PlatformExtensions.ClearRuntimeAttributes();
            ReflectionExtensions.Reset();
            JsState.Reset();
        }