Exemplo n.º 1
0
        private void IndexConcreteMethods(ModuleDefinition module)
        {
            var implementationMethods = DecompilerService.GetConcreteMethods(module);

            foreach (var method in implementationMethods)
            {
                if (ShouldSkip(method))
                {
                    continue;
                }

                var methodNameKey = SignatureKeyService.GetFullMethodSignature(method);
                if (!ImplementationMethodsIndexedByName.ContainsKey(methodNameKey))
                {
                    ImplementationMethodsIndexedByName.Add(methodNameKey, method);
                    ImplementationMethodsList.Add(method);
                    ImplementationMethodsIndexedByTypeName.Add(method.DeclaringType.FullName, method);
                }

                var genericSignature = SignatureKeyService.GetGenericMethodSignature(method);
                if (!string.IsNullOrEmpty(genericSignature))
                {
                    if (!ImplementationMethodsIndexedByGenericSignature.ContainsKey(genericSignature))
                    {
                        ImplementationMethodsIndexedByGenericSignature.Add(genericSignature, method);
                    }
                }
            }
        }