예제 #1
0
 // Token: 0x06000A56 RID: 2646 RVA: 0x0003D74C File Offset: 0x0003B94C
 public Session(Class_424 jArray)
 {
     try
     {
         this.LoginTime    = jArray.dmethod_2466 <long>(0).ToDateTime();
         this.LastSeenTime = jArray.dmethod_2466 <long>(1).ToDateTime();
         this.Client       = jArray.dmethod_2466 <string>(2);
         this.IpAddress    = IPAddress.Parse(jArray.dmethod_2466 <string>(3));
         this.Country      = jArray.dmethod_2466 <string>(4);
         this.SessionId    = jArray.dmethod_2466 <string>(6);
         jArray.dmethod_2466 <long>(7);
         if (jArray.dmethod_2466 <long>(5) == 1L)
         {
             this.Status |= Class_237.Current;
         }
         if (jArray.dmethod_2466 <long>(7) == 1L)
         {
             this.Status |= Class_237.Active;
         }
         if (this.Status == Class_237.Undefined)
         {
             this.Status = Class_237.Expired;
         }
     }
     catch (Exception ex)
     {
         this.Client = "Deserialization error: " + ex.Message;
     }
 }
예제 #2
0
            // Token: 0x06000A53 RID: 2643 RVA: 0x0003D6CC File Offset: 0x0003B8CC
            public virtual object nmethod_1(Class_285 arg_0, Type arg_1, object obje_0, Class_418 arg_2)
            {
                if (arg_0.prop_9 == Class_508.Null)
                {
                    return(null);
                }
                Class_274 class_ = new Class_274();

                foreach (Class_424 jArray in Class_424.xmethod_3351(arg_0).OfType <Class_424>())
                {
                    class_.Add(new Class_274.NClass_0.Session(jArray));
                }
                return(class_);
            }
예제 #3
0
        // Token: 0x06000C99 RID: 3225 RVA: 0x00045014 File Offset: 0x00043214
        public virtual IEnumerable <Class_361> pmethod_2259(IEnumerable <Class_361> arg_0, bool bool_0)
        {
            if (this.prop_2 == 0)
            {
                throw new Class_318("Step cannot be zero.");
            }
            foreach (Class_361 class_ in arg_0)
            {
                Class_424 class_2 = class_ as Class_424;
                if (class_2 != null)
                {
                    int num  = this.prop_2 ?? 1;
                    int num2 = this.prop_0 ?? ((num > 0) ? 0 : (class_2.prop_9 - 1));
                    int num3 = this.prop_1 ?? ((num > 0) ? class_2.prop_9 : -1);
                    if (this.prop_0 < 0)
                    {
                        num2 = class_2.prop_9 + num2;
                    }
                    if (this.prop_1 < 0)
                    {
                        num3 = class_2.prop_9 + num3;
                    }
                    num2 = Math.Max(num2, (num > 0) ? 0 : int.MinValue);
                    num2 = Math.Min(num2, (num > 0) ? class_2.prop_9 : (class_2.prop_9 - 1));
                    num3 = Math.Max(num3, -1);
                    num3 = Math.Min(num3, class_2.prop_9);
                    bool bool_ = num > 0;
                    if (this.smethod_2260(num2, num3, bool_))
                    {
                        int num4 = num2;
                        while (this.smethod_2260(num4, num3, bool_))
                        {
                            yield return(class_2.lmethod_3358(num4));

                            num4 += num;
                        }
                    }
                    else if (bool_0)
                    {
                        throw new Class_318("Array slice of {0} to {1} returned no results.".FormatWith(CultureInfo.InvariantCulture, (this.prop_0 != null) ? this.prop_0.Value.ToString(CultureInfo.InvariantCulture) : "*", (this.prop_1 != null) ? this.prop_1.Value.ToString(CultureInfo.InvariantCulture) : "*"));
                    }
                }
                else if (bool_0)
                {
                    throw new Class_318("Array slice is not valid on {0}.".FormatWith(CultureInfo.InvariantCulture, class_.GetType().Name));
                }
            }
            yield break;
        }
예제 #4
0
        // Token: 0x06000C75 RID: 3189 RVA: 0x000448F8 File Offset: 0x00042AF8
        protected static Class_361 dmethod_2246(Class_361 arg_0, bool bool_0, int sayıInt_0)
        {
            Class_424 class_  = arg_0 as Class_424;
            Class_421 class_2 = arg_0 as Class_421;

            if (class_ != null)
            {
                if (class_.prop_9 > sayıInt_0)
                {
                    return(class_.lmethod_3358(sayıInt_0));
                }
                if (bool_0)
                {
                    throw new Class_318("Index {0} outside the bounds of JArray.".FormatWith(CultureInfo.InvariantCulture, sayıInt_0));
                }
                return(null);
            }
            else if (class_2 != null)
            {
                if (class_2.prop_9 > sayıInt_0)
                {
                    return(class_2.cmethod_2464(sayıInt_0));
                }
                if (bool_0)
                {
                    throw new Class_318("Index {0} outside the bounds of JConstructor.".FormatWith(CultureInfo.InvariantCulture, sayıInt_0));
                }
                return(null);
            }
            else
            {
                if (bool_0)
                {
                    throw new Class_318("Index {0} not valid on {1}.".FormatWith(CultureInfo.InvariantCulture, sayıInt_0, arg_0.GetType().Name));
                }
                return(null);
            }
        }
예제 #5
0
        // Token: 0x06000C04 RID: 3076 RVA: 0x00043064 File Offset: 0x00041264
        public virtual object xmethod_2161(Class_285 arg_0, Type arg_1, object obje_0, Class_418 arg_2)
        {
            if (arg_0.prop_9 == Class_508.Null)
            {
                return(null);
            }
            object    obj    = null;
            string    text   = null;
            Class_424 class_ = null;

            Class_305.gmethod_2163(arg_0);
            while (arg_0.prop_9 == Class_508.PropertyName)
            {
                string text2 = arg_0.prop_10.ToString();
                if (string.Equals(text2, "Case", StringComparison.OrdinalIgnoreCase))
                {
                    Class_305.gmethod_2163(arg_0);
                    Class_489 <object, object> getUnionCases = Class_484.GetUnionCases;
                    object   target = null;
                    object[] array  = new object[2];
                    array[0] = arg_1;
                    IEnumerable enumerable = (IEnumerable)getUnionCases(target, array);
                    text = arg_0.prop_10.ToString();
                    foreach (object obj2 in enumerable)
                    {
                        if ((string)Class_484.GetUnionCaseInfoName(obj2) == text)
                        {
                            obj = obj2;
                            break;
                        }
                    }
                    if (obj == null)
                    {
                        throw Class_417.xmethod_3101(arg_0, "No union type found with the name '{0}'.".FormatWith(CultureInfo.InvariantCulture, text));
                    }
                }
                else
                {
                    if (!string.Equals(text2, "Fields", StringComparison.OrdinalIgnoreCase))
                    {
                        throw Class_417.xmethod_3101(arg_0, "Unexpected property '{0}' found when reading union.".FormatWith(CultureInfo.InvariantCulture, text2));
                    }
                    Class_305.gmethod_2163(arg_0);
                    if (arg_0.prop_9 != Class_508.StartArray)
                    {
                        throw Class_417.xmethod_3101(arg_0, "Union fields must been an array.");
                    }
                    class_ = (Class_424)Class_361.dmethod_2566(arg_0);
                }
                Class_305.gmethod_2163(arg_0);
            }
            if (obj == null)
            {
                throw Class_417.xmethod_3101(arg_0, "No '{0}' property with union name found.".FormatWith(CultureInfo.InvariantCulture, "Case"));
            }
            PropertyInfo[] array2 = (PropertyInfo[])Class_484.GetUnionCaseInfoFields(obj, new object[0]);
            object[]       array3 = new object[array2.Length];
            if (array2.Length > 0 && class_ == null)
            {
                throw Class_417.xmethod_3101(arg_0, "No '{0}' property with union fields found.".FormatWith(CultureInfo.InvariantCulture, "Fields"));
            }
            if (class_ != null)
            {
                if (array2.Length != class_.prop_9)
                {
                    throw Class_417.xmethod_3101(arg_0, "The number of field values does not match the number of properties definied by union '{0}'.".FormatWith(CultureInfo.InvariantCulture, text));
                }
                for (int i = 0; i < class_.prop_9; i++)
                {
                    Class_361    class_2      = class_.lmethod_3358(i);
                    PropertyInfo propertyInfo = array2[i];
                    array3[i] = class_2.vmethod_2565(propertyInfo.PropertyType, arg_2);
                }
            }
            Class_489 <object, object> makeUnion = Class_484.MakeUnion;
            object target2 = null;

            object[] array4 = new object[3];
            array4[0] = obj;
            array4[1] = array3;
            return(makeUnion(target2, array4));
        }