示例#1
0
 // Token: 0x060011A1 RID: 4513 RVA: 0x0005719C File Offset: 0x0005539C
 internal static IEnumerable <U> Values <T, U>(this IEnumerable <T> source, object key) where T : Class_361
 {
     Class_517.ArgumentNotNull(source, "source");
     foreach (T t2 in source)
     {
         Class_361 token = t2;
         if (key == null)
         {
             if (token is Class_362)
             {
                 yield return(((Class_362)token).Convert <Class_362, U>());
             }
             else
             {
                 foreach (Class_361 t in token.pmethod_2469())
                 {
                     yield return(t.Convert <Class_361, U>());
                 }
             }
         }
         else
         {
             Class_361 value = token.cmethod_2464(key);
             if (value != null)
             {
                 yield return(value.Convert <Class_361, U>());
             }
         }
     }
     yield break;
 }
示例#2
0
 // Token: 0x060014C0 RID: 5312 RVA: 0x0005F754 File Offset: 0x0005D954
 private Class_459 tmethod_3792(Class_459 arg_0)
 {
     if (arg_0.prop_35 != null)
     {
         string text = arg_0.prop_35;
         bool   flag = text.StartsWith("#", StringComparison.Ordinal);
         if (flag)
         {
             text = this.xmethod_3791(text);
         }
         Class_459 class_ = this.field_1.xmethod_3531(text);
         if (class_ == null)
         {
             if (flag)
             {
                 string[] array = arg_0.prop_35.TrimStart(new char[]
                 {
                     '#'
                 }).Split(new char[]
                 {
                     '/'
                 }, StringSplitOptions.RemoveEmptyEntries);
                 Class_361 class_2 = this.field_4;
                 foreach (string str_ in array)
                 {
                     string text2 = this.xmethod_3791(str_);
                     if (class_2.prop_3 == Class_428.Object)
                     {
                         class_2 = class_2.cmethod_2464(text2);
                     }
                     else if (class_2.prop_3 == Class_428.Array || class_2.prop_3 == Class_428.Constructor)
                     {
                         int num;
                         if (int.TryParse(text2, out num) && num >= 0 && num < class_2.Count <Class_361>())
                         {
                             class_2 = class_2.cmethod_2464(num);
                         }
                         else
                         {
                             class_2 = null;
                         }
                     }
                     if (class_2 == null)
                     {
                         break;
                     }
                 }
                 if (class_2 != null)
                 {
                     class_ = this.gmethod_3793(class_2);
                 }
             }
             if (class_ == null)
             {
                 throw new Class_318("Could not resolve schema reference '{0}'.".FormatWith(CultureInfo.InvariantCulture, arg_0.prop_35));
             }
         }
         arg_0 = class_;
     }
     if (arg_0.prop_36)
     {
         return(arg_0);
     }
     arg_0.prop_36 = true;
     if (arg_0.prop_31 != null)
     {
         for (int j = 0; j < arg_0.prop_31.Count; j++)
         {
             arg_0.prop_31[j] = this.tmethod_3792(arg_0.prop_31[j]);
         }
     }
     if (arg_0.prop_18 != null)
     {
         for (int k = 0; k < arg_0.prop_18.Count; k++)
         {
             arg_0.prop_18[k] = this.tmethod_3792(arg_0.prop_18[k]);
         }
     }
     if (arg_0.prop_20 != null)
     {
         arg_0.prop_20 = this.tmethod_3792(arg_0.prop_20);
     }
     if (arg_0.prop_25 != null)
     {
         foreach (KeyValuePair <string, Class_459> keyValuePair in arg_0.prop_25.ToList <KeyValuePair <string, Class_459> >())
         {
             arg_0.prop_25[keyValuePair.Key] = this.tmethod_3792(keyValuePair.Value);
         }
     }
     if (arg_0.prop_23 != null)
     {
         foreach (KeyValuePair <string, Class_459> keyValuePair2 in arg_0.prop_23.ToList <KeyValuePair <string, Class_459> >())
         {
             arg_0.prop_23[keyValuePair2.Key] = this.tmethod_3792(keyValuePair2.Value);
         }
     }
     if (arg_0.prop_24 != null)
     {
         arg_0.prop_24 = this.tmethod_3792(arg_0.prop_24);
     }
     return(arg_0);
 }