diff --git a/Src/Newtonsoft.Json/Bson/BsonReader.cs b/Src/Newtonsoft.Json/Bson/BsonReader.cs index ccd5662f..477b778e 100644 --- a/Src/Newtonsoft.Json/Bson/BsonReader.cs +++ b/Src/Newtonsoft.Json/Bson/BsonReader.cs @@ -61,15 +61,15 @@ namespace Newtonsoft.Json.Bson private enum BsonReaderState { - Normal, - ReferenceStart, - ReferenceRef, - ReferenceId, - CodeWScopeStart, - CodeWScopeCode, - CodeWScopeScope, - CodeWScopeScopeObject, - CodeWScopeScopeEnd + Normal = 0, + ReferenceStart = 1, + ReferenceRef = 2, + ReferenceId = 3, + CodeWScopeStart = 4, + CodeWScopeCode = 5, + CodeWScopeScope = 6, + CodeWScopeScopeObject = 7, + CodeWScopeScopeEnd = 8 } private class ContainerContext diff --git a/Src/Newtonsoft.Json/DateParseHandling.cs b/Src/Newtonsoft.Json/DateParseHandling.cs index 84abaf56..359ac355 100644 --- a/Src/Newtonsoft.Json/DateParseHandling.cs +++ b/Src/Newtonsoft.Json/DateParseHandling.cs @@ -33,17 +33,17 @@ namespace Newtonsoft.Json /// /// Date formatted strings are not parsed to a date type and are read as strings. /// - None, + None = 0, /// /// Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . /// - DateTime, + DateTime = 1, #if !NET20 /// /// Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . /// - DateTimeOffset + DateTimeOffset = 2 #endif } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/DateTimeZoneHandling.cs b/Src/Newtonsoft.Json/DateTimeZoneHandling.cs index df889089..9877d6e7 100644 --- a/Src/Newtonsoft.Json/DateTimeZoneHandling.cs +++ b/Src/Newtonsoft.Json/DateTimeZoneHandling.cs @@ -35,22 +35,22 @@ namespace Newtonsoft.Json /// /// Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. /// - Local, + Local = 0, /// /// Treat as a UTC. If the object represents a local time, it is converted to a UTC. /// - Utc, + Utc = 1, /// /// Treat as a local time if a is being converted to a string. /// If a string is being converted to , convert to a local time if a time zone is specified. /// - Unspecified, + Unspecified = 2, /// /// Time zone information should be preserved when converting. /// - RoundtripKind + RoundtripKind = 3 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/FloatFormatHandling.cs b/Src/Newtonsoft.Json/FloatFormatHandling.cs index f39f7cc4..1c7f424b 100644 --- a/Src/Newtonsoft.Json/FloatFormatHandling.cs +++ b/Src/Newtonsoft.Json/FloatFormatHandling.cs @@ -34,17 +34,17 @@ namespace Newtonsoft.Json /// /// Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". /// - String, + String = 0, /// /// Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. /// Note that this will produce non-valid JSON. /// - Symbol, + Symbol = 1, /// /// Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a property. /// - DefaultValue + DefaultValue = 2 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/FloatParseHandling.cs b/Src/Newtonsoft.Json/FloatParseHandling.cs index 093d6e98..30583944 100644 --- a/Src/Newtonsoft.Json/FloatParseHandling.cs +++ b/Src/Newtonsoft.Json/FloatParseHandling.cs @@ -33,11 +33,11 @@ namespace Newtonsoft.Json /// /// Floating point numbers are parsed to . /// - Double, + Double = 0, /// /// Floating point numbers are parsed to . /// - Decimal + Decimal = 1 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/FormatterAssemblyStyle.cs b/Src/Newtonsoft.Json/FormatterAssemblyStyle.cs index 0029781f..39d3f73a 100644 --- a/Src/Newtonsoft.Json/FormatterAssemblyStyle.cs +++ b/Src/Newtonsoft.Json/FormatterAssemblyStyle.cs @@ -11,12 +11,12 @@ namespace System.Runtime.Serialization.Formatters /// /// In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method is used to load the assembly. /// - Simple, + Simple = 0, /// /// In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the Assembly class is used to load the assembly. /// - Full + Full = 1 } } diff --git a/Src/Newtonsoft.Json/Formatting.cs b/Src/Newtonsoft.Json/Formatting.cs index 55043b52..9438e63b 100644 --- a/Src/Newtonsoft.Json/Formatting.cs +++ b/Src/Newtonsoft.Json/Formatting.cs @@ -33,11 +33,11 @@ namespace Newtonsoft.Json /// /// No special formatting is applied. This is the default. /// - None, + None = 0, /// /// Causes child objects to be indented according to the and settings. /// - Indented + Indented = 1 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/JsonPosition.cs b/Src/Newtonsoft.Json/JsonPosition.cs index 7bd879e7..bfb64660 100644 --- a/Src/Newtonsoft.Json/JsonPosition.cs +++ b/Src/Newtonsoft.Json/JsonPosition.cs @@ -33,10 +33,10 @@ namespace Newtonsoft.Json { internal enum JsonContainerType { - None, - Object, - Array, - Constructor + None = 0, + Object = 1, + Array = 2, + Constructor = 3 } internal struct JsonPosition diff --git a/Src/Newtonsoft.Json/JsonToken.cs b/Src/Newtonsoft.Json/JsonToken.cs index a159902f..5e1e47f6 100644 --- a/Src/Newtonsoft.Json/JsonToken.cs +++ b/Src/Newtonsoft.Json/JsonToken.cs @@ -37,91 +37,91 @@ namespace Newtonsoft.Json /// /// This is returned by the if a method has not been called. /// - None, + None = 0, /// /// An object start token. /// - StartObject, + StartObject = 1, /// /// An array start token. /// - StartArray, + StartArray = 2, /// /// A constructor start token. /// - StartConstructor, + StartConstructor = 3, /// /// An object property name. /// - PropertyName, + PropertyName = 4, /// /// A comment. /// - Comment, + Comment = 5, /// /// Raw JSON. /// - Raw, + Raw = 6, /// /// An integer. /// - Integer, + Integer = 7, /// /// A float. /// - Float, + Float = 8, /// /// A string. /// - String, + String = 9, /// /// A boolean. /// - Boolean, + Boolean = 10, /// /// A null token. /// - Null, + Null = 11, /// /// An undefined token. /// - Undefined, + Undefined = 12, /// /// An object end token. /// - EndObject, + EndObject = 13, /// /// An array end token. /// - EndArray, + EndArray = 14, /// /// A constructor end token. /// - EndConstructor, + EndConstructor = 15, /// /// A Date. /// - Date, + Date = 16, /// /// Byte data. /// - Bytes + Bytes = 17 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/JsonWriter.cs b/Src/Newtonsoft.Json/JsonWriter.cs index 6f2b0806..03c7b4b6 100644 --- a/Src/Newtonsoft.Json/JsonWriter.cs +++ b/Src/Newtonsoft.Json/JsonWriter.cs @@ -47,16 +47,16 @@ namespace Newtonsoft.Json { internal enum State { - Start, - Property, - ObjectStart, - Object, - ArrayStart, - Array, - ConstructorStart, - Constructor, - Closed, - Error + Start = 0, + Property = 1, + ObjectStart = 2, + Object = 3, + ArrayStart = 4, + Array = 5, + ConstructorStart = 6, + Constructor = 7, + Closed = 8, + Error = 9 } // array that gives a new state based on the current state an the token being written diff --git a/Src/Newtonsoft.Json/Linq/JTokenType.cs b/Src/Newtonsoft.Json/Linq/JTokenType.cs index 00e04a40..36918733 100644 --- a/Src/Newtonsoft.Json/Linq/JTokenType.cs +++ b/Src/Newtonsoft.Json/Linq/JTokenType.cs @@ -33,91 +33,91 @@ namespace Newtonsoft.Json.Linq /// /// No token type has been set. /// - None, + None = 0, /// /// A JSON object. /// - Object, + Object = 1, /// /// A JSON array. /// - Array, + Array = 2, /// /// A JSON constructor. /// - Constructor, + Constructor = 3, /// /// A JSON object property. /// - Property, + Property = 4, /// /// A comment. /// - Comment, + Comment = 5, /// /// An integer value. /// - Integer, + Integer = 6, /// /// A float value. /// - Float, + Float = 7, /// /// A string value. /// - String, + String = 8, /// /// A boolean value. /// - Boolean, + Boolean = 9, /// /// A null value. /// - Null, + Null = 10, /// /// An undefined value. /// - Undefined, + Undefined = 11, /// /// A date value. /// - Date, + Date = 12, /// /// A raw JSON value. /// - Raw, + Raw = 13, /// /// A collection of bytes value. /// - Bytes, + Bytes = 14, /// /// A Guid value. /// - Guid, + Guid = 15, /// /// A Uri value. /// - Uri, + Uri = 16, /// /// A TimeSpan value. /// - TimeSpan + TimeSpan = 17 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/Linq/JsonPath/QueryExpression.cs b/Src/Newtonsoft.Json/Linq/JsonPath/QueryExpression.cs index 4ff4aabf..c07f3a08 100644 --- a/Src/Newtonsoft.Json/Linq/JsonPath/QueryExpression.cs +++ b/Src/Newtonsoft.Json/Linq/JsonPath/QueryExpression.cs @@ -5,16 +5,16 @@ namespace Newtonsoft.Json.Linq.JsonPath { internal enum QueryOperator { - None, - Equals, - NotEquals, - Exists, - LessThan, - LessThanOrEquals, - GreaterThan, - GreaterThanOrEquals, - And, - Or + None = 0, + Equals = 1, + NotEquals = 2, + Exists = 3, + LessThan = 4, + LessThanOrEquals = 5, + GreaterThan = 6, + GreaterThanOrEquals = 7, + And = 8, + Or = 9 } internal abstract class QueryExpression diff --git a/Src/Newtonsoft.Json/Linq/MergeArrayHandling.cs b/Src/Newtonsoft.Json/Linq/MergeArrayHandling.cs index 8055dc2f..5e7fadf1 100644 --- a/Src/Newtonsoft.Json/Linq/MergeArrayHandling.cs +++ b/Src/Newtonsoft.Json/Linq/MergeArrayHandling.cs @@ -6,15 +6,15 @@ namespace Newtonsoft.Json.Linq public enum MergeArrayHandling { /// Concatenate arrays. - Concat, + Concat = 0, /// Union arrays, skipping items that already exist. - Union, + Union = 1, /// Replace all array items. - Replace, + Replace = 2, /// Merge array items together, matched by index. - Merge + Merge = 3 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/MemberSerialization.cs b/Src/Newtonsoft.Json/MemberSerialization.cs index 8ed52304..bb68cd50 100644 --- a/Src/Newtonsoft.Json/MemberSerialization.cs +++ b/Src/Newtonsoft.Json/MemberSerialization.cs @@ -39,20 +39,20 @@ namespace Newtonsoft.Json /// All public members are serialized by default. Members can be excluded using or . /// This is the default member serialization mode. /// - OptOut, + OptOut = 0, /// /// Only members must be marked with or are serialized. /// This member serialization mode can also be set by marking the class with . /// - OptIn, + OptIn = 1, /// /// All public and private fields are serialized. Members can be excluded using or . /// This member serialization mode can also be set by marking the class with /// and setting IgnoreSerializableAttribute on to false. /// - Fields + Fields = 2 #pragma warning restore 1584,1711,1572,1581,1580,1574 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/Required.cs b/Src/Newtonsoft.Json/Required.cs index 889aa6d0..5e145234 100644 --- a/Src/Newtonsoft.Json/Required.cs +++ b/Src/Newtonsoft.Json/Required.cs @@ -33,16 +33,16 @@ namespace Newtonsoft.Json /// /// The property is not required. The default state. /// - Default, + Default = 0, /// /// The property must be defined in JSON but can be a null value. /// - AllowNull, + AllowNull = 1, /// /// The property must be defined in JSON and cannot be a null value. /// - Always + Always = 2 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/Serialization/JsonContract.cs b/Src/Newtonsoft.Json/Serialization/JsonContract.cs index dfc8a19b..105a2629 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonContract.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonContract.cs @@ -35,19 +35,19 @@ namespace Newtonsoft.Json.Serialization { internal enum JsonContractType { - None, - Object, - Array, - Primitive, - String, - Dictionary, + None = 0, + Object = 1, + Array = 2, + Primitive = 3, + String = 4, + Dictionary = 5, #if !(NET35 || NET20 || PORTABLE40) - Dynamic, + Dynamic = 6, #endif #if !(NETFX_CORE || PORTABLE || PORTABLE40) - Serializable, + Serializable = 7, #endif - Linq + Linq = 8 } /// diff --git a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs index e90c7e4d..697a5c37 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs @@ -52,9 +52,9 @@ namespace Newtonsoft.Json.Serialization { internal enum PropertyPresence { - None, - Null, - Value + None = 0, + Null = 1, + Value = 2 } private JsonSerializerProxy _internalSerializer; diff --git a/Src/Newtonsoft.Json/StringEscapeHandling.cs b/Src/Newtonsoft.Json/StringEscapeHandling.cs index 13a332b3..4016eb6e 100644 --- a/Src/Newtonsoft.Json/StringEscapeHandling.cs +++ b/Src/Newtonsoft.Json/StringEscapeHandling.cs @@ -33,16 +33,16 @@ namespace Newtonsoft.Json /// /// Only control characters (e.g. newline) are escaped. /// - Default, + Default = 0, /// /// All non-ASCII and control characters (e.g. newline) are escaped. /// - EscapeNonAscii, + EscapeNonAscii = 1, /// /// HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. /// - EscapeHtml + EscapeHtml = 2 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/TraceLevel.cs b/Src/Newtonsoft.Json/TraceLevel.cs index e80d532d..a6244d8e 100644 --- a/Src/Newtonsoft.Json/TraceLevel.cs +++ b/Src/Newtonsoft.Json/TraceLevel.cs @@ -12,27 +12,27 @@ namespace Newtonsoft.Json /// /// Output no tracing and debugging messages. /// - Off, + Off = 0, /// /// Output error-handling messages. /// - Error, + Error = 1, /// /// Output warnings and error-handling messages. /// - Warning, + Warning = 2, /// /// Output informational messages, warnings, and error-handling messages. /// - Info, + Info = 3, /// /// Output all debugging and tracing messages. /// - Verbose + Verbose = 4 } } diff --git a/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs b/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs index 5d4627ea..be8f2900 100644 --- a/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs +++ b/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs @@ -46,52 +46,52 @@ namespace Newtonsoft.Json.Utilities { internal enum PrimitiveTypeCode { - Empty, - Object, - Char, - CharNullable, - Boolean, - BooleanNullable, - SByte, - SByteNullable, - Int16, - Int16Nullable, - UInt16, - UInt16Nullable, - Int32, - Int32Nullable, - Byte, - ByteNullable, - UInt32, - UInt32Nullable, - Int64, - Int64Nullable, - UInt64, - UInt64Nullable, - Single, - SingleNullable, - Double, - DoubleNullable, - DateTime, - DateTimeNullable, + Empty = 0, + Object = 1, + Char = 2, + CharNullable = 3, + Boolean = 4, + BooleanNullable = 5, + SByte = 6, + SByteNullable = 7, + Int16 = 8, + Int16Nullable = 9, + UInt16 = 10, + UInt16Nullable = 11, + Int32 = 12, + Int32Nullable = 13, + Byte = 14, + ByteNullable = 15, + UInt32 = 16, + UInt32Nullable = 17, + Int64 = 18, + Int64Nullable = 19, + UInt64 = 20, + UInt64Nullable = 21, + Single = 22, + SingleNullable = 23, + Double = 24, + DoubleNullable = 25, + DateTime = 26, + DateTimeNullable = 27, #if !NET20 - DateTimeOffset, - DateTimeOffsetNullable, + DateTimeOffset = 28, + DateTimeOffsetNullable = 29, #endif - Decimal, - DecimalNullable, - Guid, - GuidNullable, - TimeSpan, - TimeSpanNullable, + Decimal = 30, + DecimalNullable = 31, + Guid = 32, + GuidNullable = 33, + TimeSpan = 34, + TimeSpanNullable = 35, #if !(PORTABLE || NET35 || NET20) - BigInteger, - BigIntegerNullable, + BigInteger = 36, + BigIntegerNullable = 37, #endif - Uri, - String, - Bytes, - DBNull + Uri = 38, + String = 39, + Bytes = 40, + DBNull = 41 } internal class TypeInformation @@ -102,10 +102,10 @@ namespace Newtonsoft.Json.Utilities internal enum ParseResult { - None, - Success, - Overflow, - Invalid + None = 0, + Success = 1, + Overflow = 2, + Invalid = 3 } internal static class ConvertUtils @@ -360,10 +360,10 @@ namespace Newtonsoft.Json.Utilities #region TryConvert internal enum ConvertResult { - Success, - CannotConvertNull, - NotInstantiableType, - NoValidConversion + Success = 0, + CannotConvertNull = 1, + NotInstantiableType = 2, + NoValidConversion = 3 } public static object Convert(object initialValue, CultureInfo culture, Type targetType) diff --git a/Src/Newtonsoft.Json/Utilities/DateTimeParser.cs b/Src/Newtonsoft.Json/Utilities/DateTimeParser.cs index 3188d560..0e506885 100644 --- a/Src/Newtonsoft.Json/Utilities/DateTimeParser.cs +++ b/Src/Newtonsoft.Json/Utilities/DateTimeParser.cs @@ -29,10 +29,10 @@ namespace Newtonsoft.Json.Utilities { internal enum ParserTimeZone { - Unspecified, - Utc, - LocalWestOfUtc, - LocalEastOfUtc + Unspecified = 0, + Utc = 1, + LocalWestOfUtc = 2, + LocalEastOfUtc = 3 } internal struct DateTimeParser diff --git a/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs b/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs index ca32ebb5..2de8dca3 100644 --- a/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs +++ b/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs @@ -46,11 +46,11 @@ namespace Newtonsoft.Json.Utilities #if (NETFX_CORE || PORTABLE || PORTABLE40) internal enum MemberTypes { - Property, - Field, - Event, - Method, - Other + Property = 0, + Field = 1, + Event = 2, + Method = 3, + Other = 4 } #endif diff --git a/Src/Newtonsoft.Json/WriteState.cs b/Src/Newtonsoft.Json/WriteState.cs index c5352a53..b28b542d 100644 --- a/Src/Newtonsoft.Json/WriteState.cs +++ b/Src/Newtonsoft.Json/WriteState.cs @@ -37,36 +37,36 @@ namespace Newtonsoft.Json /// You may call the method to put the in the Closed state. /// Any other method calls results in an being thrown. /// - Error, + Error = 0, /// /// The method has been called. /// - Closed, + Closed = 1, /// /// An object is being written. /// - Object, + Object = 2, /// /// A array is being written. /// - Array, + Array = 3, /// /// A constructor is being written. /// - Constructor, + Constructor = 4, /// /// A property is being written. /// - Property, + Property = 5, /// /// A write method has not been called. /// - Start + Start = 6 } } \ No newline at end of file