Пример #1
0
    // Token: 0x06000EED RID: 3821 RVA: 0x000460CC File Offset: 0x000442CC
    internal static bool smethod_1(object object_2, object object_3)
    {
        if (object_2.Equals(object_3))
        {
            return(true);
        }
        if ((object_2.Type == JTokenType.Integer && object_3.Type == JTokenType.Float) || (object_2.Type == JTokenType.Float && object_3.Type == JTokenType.Integer))
        {
            return(JValue.smethod_7(object_2.Type, object_2.Value, object_3.Value) == 0);
        }
        if (object_3.Type != JTokenType.String)
        {
            return(false);
        }
        string b = (string)object_3.Value;
        string a;

        switch (object_2.Type)
        {
        case JTokenType.Date:
            using (StringWriter stringWriter = Class97.smethod_6(64))
            {
                object value;
                if ((value = object_2.Value) is DateTimeOffset)
                {
                    DateTimeOffset dateTimeOffset_ = (DateTimeOffset)value;
                    Class25.IxisRjgvuh(stringWriter, dateTimeOffset_, DateFormatHandling.IsoDateFormat, null, CultureInfo.InvariantCulture);
                }
                else
                {
                    Class25.smethod_24(stringWriter, (DateTime)object_2.Value, DateFormatHandling.IsoDateFormat, null, CultureInfo.InvariantCulture);
                }
                a = stringWriter.ToString();
                goto IL_11C;
            }
            break;

        case JTokenType.Bytes:
            a = Convert.ToBase64String((byte[])object_2.Value);
            goto IL_11C;

        case JTokenType.Guid:
        case JTokenType.TimeSpan:
            a = object_2.Value.ToString();
            goto IL_11C;

        case JTokenType.Uri:
            a = ((Uri)object_2.Value).OriginalString;
            goto IL_11C;
        }
        return(false);

IL_11C:
        return(string.Equals(a, b, StringComparison.Ordinal));
    }
Пример #2
0
    // Token: 0x060006E9 RID: 1769 RVA: 0x0002CDE0 File Offset: 0x0002AFE0
    public static string smethod_3(string string_0, char char_0, bool bool_3, StringEscapeHandling stringEscapeHandling_0)
    {
        bool[] object_ = Class70.smethod_0(stringEscapeHandling_0, char_0);
        string result;

        using (StringWriter stringWriter = Class97.smethod_6((string_0 != null) ? string_0.Length : 16))
        {
            char[] array = null;
            Class70.smethod_2(stringWriter, string_0, char_0, bool_3, object_, stringEscapeHandling_0, null, ref array);
            result = stringWriter.ToString();
        }
        return(result);
    }