public void Add(TypeReference type, int attrs = 0)
        {
            type = Naming.RemoveModifiers(type);
            Il2CppTypeData key  = new Il2CppTypeData(type, attrs);
            object         obj2 = this._data;

            lock (obj2)
            {
                if (this._data.ContainsKey(key))
                {
                    return;
                }
                this._data.Add(key, this._data.Count);
            }
            GenericInstanceType type2 = type as GenericInstanceType;

            if (type2 != null)
            {
                Il2CppGenericInstCollector.Add(type2.GenericArguments);
            }
            ArrayType type3 = type as ArrayType;

            if (type3 != null)
            {
                this.Add(type3.ElementType, 0);
            }
            ByReferenceType type4 = type as ByReferenceType;

            if (type4 != null)
            {
                this.Add(type4.ElementType, 0);
            }
        }
 public void Add(TypeReference type, [Optional, DefaultParameterValue(0)] int attrs)
 {
     type = Naming.RemoveModifiers(type);
     Il2CppTypeData key = new Il2CppTypeData(type, attrs);
     object obj2 = this._data;
     lock (obj2)
     {
         if (this._data.ContainsKey(key))
         {
             return;
         }
         this._data.Add(key, this._data.Count);
     }
     GenericInstanceType type2 = type as GenericInstanceType;
     if (type2 != null)
     {
         Il2CppGenericInstCollector.Add(type2.GenericArguments);
     }
     ArrayType type3 = type as ArrayType;
     if (type3 != null)
     {
         this.Add(type3.ElementType, 0);
     }
     ByReferenceType type4 = type as ByReferenceType;
     if (type4 != null)
     {
         this.Add(type4.ElementType, 0);
     }
 }
 public int GetIndex(TypeReference type, [Optional, DefaultParameterValue(0)] int attrs)
 {
     int num;
     Il2CppTypeData key = new Il2CppTypeData(Naming.RemoveModifiers(type), attrs);
     if (!this._data.TryGetValue(key, out num))
     {
         throw new InvalidOperationException(string.Format("Il2CppTypeIndexFor type {0} does not exist.", type.FullName));
     }
     return num;
 }
        public int GetIndex(TypeReference type, int attrs = 0)
        {
            int            num;
            Il2CppTypeData key = new Il2CppTypeData(Naming.RemoveModifiers(type), attrs);

            if (!this._data.TryGetValue(key, out num))
            {
                throw new InvalidOperationException($"Il2CppTypeIndexFor type {type.FullName} does not exist.");
            }
            return(num);
        }
 public int GetOrCreateIndex(TypeReference type, [Optional, DefaultParameterValue(0)] int attrs)
 {
     int num;
     Il2CppTypeData key = new Il2CppTypeData(Naming.RemoveModifiers(type), attrs);
     if (this._data.TryGetValue(key, out num))
     {
         return num;
     }
     this.Add(type, attrs);
     return this._data[key];
 }
        public int GetOrCreateIndex(TypeReference type, int attrs = 0)
        {
            int            num;
            Il2CppTypeData key = new Il2CppTypeData(Naming.RemoveModifiers(type), attrs);

            if (this._data.TryGetValue(key, out num))
            {
                return(num);
            }
            this.Add(type, attrs);
            return(this._data[key]);
        }