GetInflatedMethods() public méthode

public GetInflatedMethods ( ) : IEnumerable
Résultat IEnumerable
Exemple #1
0
        private List <KeyValuePair <uint, uint> > GetValues(MetadataUsage metadataUsage, Dictionary <string, uint> items, IMetadataCollection metadataCollection)
        {
            List <KeyValuePair <uint, uint> > list = new List <KeyValuePair <uint, uint> >(metadataUsage.UsageCount);

            foreach (TypeReference reference in metadataUsage.GetIl2CppTypes())
            {
                list.Add(new KeyValuePair <uint, uint>(items[MetadataWriter.Naming.AddressOf(MetadataWriter.Naming.ForRuntimeIl2CppType(reference))], GetEncodedMetadataUsageIndex((uint)Il2CppTypeCollector.GetOrCreateIndex(reference, 0), Il2CppMetadataUsage.Il2CppType)));
            }
            foreach (TypeReference reference2 in metadataUsage.GetTypeInfos())
            {
                list.Add(new KeyValuePair <uint, uint>(items[MetadataWriter.Naming.AddressOf(MetadataWriter.Naming.ForRuntimeTypeInfo(reference2))], GetEncodedMetadataUsageIndex((uint)Il2CppTypeCollector.GetOrCreateIndex(reference2, 0), Il2CppMetadataUsage.Il2CppClass)));
            }
            foreach (MethodReference reference3 in metadataUsage.GetInflatedMethods())
            {
                list.Add(new KeyValuePair <uint, uint>(items[MetadataWriter.Naming.AddressOf(MetadataWriter.Naming.ForRuntimeMethodInfo(reference3))], Il2CppMethodReferenceCollector.GetOrCreateIndex(reference3, metadataCollection)));
            }
            foreach (FieldReference reference4 in metadataUsage.GetFieldInfos())
            {
                list.Add(new KeyValuePair <uint, uint>(items[MetadataWriter.Naming.AddressOf(MetadataWriter.Naming.ForRuntimeFieldInfo(reference4))], GetEncodedMetadataUsageIndex(Il2CppFieldReferenceCollector.GetOrCreateIndex(reference4), Il2CppMetadataUsage.FieldInfo)));
            }
            foreach (string str in metadataUsage.GetStringLiterals())
            {
                int index = StringLiteralCollection.GetIndex(str);
                list.Add(new KeyValuePair <uint, uint>(items[MetadataWriter.Naming.AddressOf(MetadataWriter.Naming.ForStringLiteralIdentifier(str))], GetEncodedMetadataUsageIndex((uint)index, Il2CppMetadataUsage.StringLiteral)));
            }
            return(list);
        }
 public void Add(string identifier, MetadataUsage usage)
 {
     this._usages.Add(identifier, usage);
     foreach (TypeReference reference in usage.GetIl2CppTypes())
     {
         this._types.Add(reference);
     }
     foreach (TypeReference reference2 in usage.GetTypeInfos())
     {
         this._typeInfos.Add(reference2);
     }
     foreach (MethodReference reference3 in usage.GetInflatedMethods())
     {
         this._inflatedMethods.Add(reference3);
     }
     foreach (FieldReference reference4 in usage.GetFieldInfos())
     {
         this._fieldInfos.Add(reference4);
     }
     foreach (string str in usage.GetStringLiterals())
     {
         this._stringLiterals.Add(str);
     }
 }
Exemple #3
0
 public void Add(string identifier, MetadataUsage usage)
 {
     this._usages.Add(identifier, usage);
     foreach (TypeReference reference in usage.GetIl2CppTypes())
     {
         this._types.Add(reference);
     }
     foreach (TypeReference reference2 in usage.GetTypeInfos())
     {
         this._typeInfos.Add(reference2);
     }
     foreach (MethodReference reference3 in usage.GetInflatedMethods())
     {
         this._inflatedMethods.Add(reference3);
     }
     foreach (FieldReference reference4 in usage.GetFieldInfos())
     {
         this._fieldInfos.Add(reference4);
     }
     foreach (string str in usage.GetStringLiterals())
     {
         this._stringLiterals.Add(str);
     }
 }