Ejemplo n.º 1
0
 // Token: 0x0600263D RID: 9789 RVA: 0x0008B7AC File Offset: 0x000899AC
 private void Change(global::VisClass.Rep.Setting setting)
 {
     if (setting.isInherited)
     {
         global::VisQuery valueSet = setting.valueSet;
         setting             = (this.dict[setting.name] = setting.Override(this.klass));
         setting.isInherited = false;
         setting.valueSet    = valueSet;
         Array.Resize <string>(ref this.klass.keys, this.klass.keys.Length + 1);
         Array.Resize <global::VisQuery>(ref this.klass.values, this.klass.values.Length + 1);
         this.klass.keys[this.klass.keys.Length - 1]     = setting.name;
         this.klass.values[this.klass.values.Length - 1] = valueSet;
     }
     else
     {
         for (int i = 0; i < this.klass.keys.Length; i++)
         {
             if (this.klass.keys[i] == setting.name)
             {
                 this.klass.values[i] = setting.query;
                 break;
             }
         }
     }
 }
Ejemplo n.º 2
0
 // Token: 0x060027C4 RID: 10180 RVA: 0x00090840 File Offset: 0x0008EA40
 internal Instance(global::VisQuery outer, ref int bit)
 {
     this.outer      = outer;
     this.applicable = new global::HSet <global::VisNode>();
     this.bit        = 1L << (bit & 31);
     this.bitNumber  = (byte)bit;
     bit++;
 }
Ejemplo n.º 3
0
 // Token: 0x06002632 RID: 9778 RVA: 0x0008B030 File Offset: 0x00089230
 public void EditorOnly_Add(ref global::VisClass.Rep rep, string key, global::VisQuery value)
 {
     Array.Resize <string>(ref this.keys, this.keys.Length + 1);
     Array.Resize <global::VisQuery>(ref this.values, this.values.Length + 1);
     this.keys[this.keys.Length - 1]     = key;
     this.values[this.values.Length - 1] = value;
     rep = null;
 }
Ejemplo n.º 4
0
 // Token: 0x0600263A RID: 9786 RVA: 0x0008B488 File Offset: 0x00089688
 internal static void Recur(ref global::VisClass.Rep rep, global::VisClass klass)
 {
     if (klass._super)
     {
         global::VisClass.Rep.Recur(ref rep, klass._super);
         foreach (global::VisClass.Rep.Setting setting in rep.dict.Values)
         {
             setting.isInherited = true;
         }
         for (int i = 0; i < klass.keys.Length; i++)
         {
             string text = klass.keys[i];
             if (!string.IsNullOrEmpty(text))
             {
                 global::VisQuery             visQuery = klass.values[i];
                 global::VisClass.Rep.Setting setting2;
                 if (!rep.dict.TryGetValue(text, out setting2))
                 {
                     if (visQuery == null)
                     {
                         goto IL_F7;
                     }
                     setting2 = new global::VisClass.Rep.Setting(text, klass, rep);
                     rep.dict.Add(text, setting2);
                 }
                 else
                 {
                     setting2 = (rep.dict[text] = setting2.Override(klass));
                 }
                 setting2.isInherited = false;
                 setting2.query       = visQuery;
             }
             IL_F7 :;
         }
     }
     else
     {
         rep       = new global::VisClass.Rep();
         rep.klass = global::VisClass.Rep.nklass;
         rep.dict  = new Dictionary <string, global::VisClass.Rep.Setting>();
         for (int j = 0; j < klass.keys.Length; j++)
         {
             string text2 = klass.keys[j];
             if (!string.IsNullOrEmpty(text2))
             {
                 global::VisQuery visQuery2 = klass.values[j];
                 if (!(visQuery2 == null))
                 {
                     global::VisClass.Rep.Setting setting3 = new global::VisClass.Rep.Setting(text2, klass, rep);
                     setting3.query = visQuery2;
                     rep.dict.Add(text2, setting3);
                 }
             }
         }
     }
 }
Ejemplo n.º 5
0
    // Token: 0x06002635 RID: 9781 RVA: 0x0008B1B4 File Offset: 0x000893B4
    private void Setup()
    {
        if (this.locked)
        {
            return;
        }
        if (this.recurseLock)
        {
            Debug.LogError("Recursion in setup hit itself, some VisClass has super set to something which references itself", this);
            return;
        }
        this.recurseLock = true;
        List <global::VisQuery>               list       = new List <global::VisQuery>();
        HashSet <global::VisQuery>            hashSet    = new HashSet <global::VisQuery>();
        Dictionary <string, global::VisQuery> dictionary = new Dictionary <string, global::VisQuery>();

        if (this._super)
        {
            this._super.Setup();
            if (this.keys != null)
            {
                for (int i = 0; i < this.keys.Length; i++)
                {
                    string text = this.keys[i];
                    if (!string.IsNullOrEmpty(text))
                    {
                        global::VisQuery visQuery = this.values[i];
                        int num;
                        if (this._super.members.TryGetValue(text, out num))
                        {
                            global::VisQuery visQuery2 = this._super.instance[num];
                            if (visQuery2 == visQuery)
                            {
                                if (visQuery2 != null)
                                {
                                    hashSet.Add(visQuery2);
                                    dictionary.Add(text, visQuery2);
                                }
                            }
                            else if (visQuery != null)
                            {
                                dictionary.Add(text, visQuery);
                                hashSet.Add(visQuery);
                            }
                        }
                        else if (visQuery != null)
                        {
                            dictionary.Add(text, visQuery);
                            hashSet.Add(visQuery);
                        }
                    }
                }
            }
            this.BuildMembers(list, hashSet);
        }
        else
        {
            for (int j = 0; j < this.keys.Length; j++)
            {
                string text2 = this.keys[j];
                if (!string.IsNullOrEmpty(text2))
                {
                    global::VisQuery visQuery3 = this.values[j];
                    if (!(visQuery3 == null))
                    {
                        dictionary.Add(text2, visQuery3);
                        if (hashSet.Add(visQuery3))
                        {
                            list.Add(visQuery3);
                        }
                    }
                }
            }
        }
        this.members = new Dictionary <string, int>(dictionary.Count);
        foreach (KeyValuePair <string, global::VisQuery> keyValuePair in dictionary)
        {
            this.members.Add(keyValuePair.Key, list.IndexOf(keyValuePair.Value));
        }
        this.instance    = list.ToArray();
        this.recurseLock = false;
        this.locked      = true;
    }