public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            bool flag;
            Type type = (flag = Class194.smethod_10(objectType)) ? Nullable.GetUnderlyingType(objectType) : objectType;

            if (reader.JsonToken_0 == JsonToken.Null)
            {
                if (!Class194.smethod_10(objectType))
                {
                    throw JsonSerializationException.smethod_1(reader, "Cannot convert null value to {0}.".smethod_0(CultureInfo.InvariantCulture, objectType));
                }
                return(null);
            }
            try
            {
                if (reader.JsonToken_0 == JsonToken.String)
                {
                    string str2;
                    string str = reader.Object_0.ToString();
                    if ((str == string.Empty) && flag)
                    {
                        return(null);
                    }
                    Class179 <string, string> class2 = this.method_0(type);
                    if (str.IndexOf(',') != -1)
                    {
                        string[] strArray = str.Split(new char[] { ',' });
                        for (int i = 0; i < strArray.Length; i++)
                        {
                            string str3 = strArray[i].Trim();
                            strArray[i] = smethod_0(class2, str3);
                        }
                        str2 = string.Join(", ", strArray);
                    }
                    else
                    {
                        str2 = smethod_0(class2, str);
                    }
                    return(Enum.Parse(type, str2, true));
                }
                if (reader.JsonToken_0 == JsonToken.Integer)
                {
                    return(Class181.smethod_10(reader.Object_0, CultureInfo.InvariantCulture, type));
                }
            }
            catch (Exception exception)
            {
                throw JsonSerializationException.smethod_2(reader, "Error converting value {0} to type '{1}'.".smethod_1(CultureInfo.InvariantCulture, Class193.smethod_7(reader.Object_0), objectType), exception);
            }
            throw JsonSerializationException.smethod_1(reader, "Unexpected token when parsing enum. Expected String or Integer, got {0}.".smethod_0(CultureInfo.InvariantCulture, reader.JsonToken_0));
        }