public IEnumerable<MethodDefinition> GetMethods(string fullTypeName) { TypeDefinition typeRef = m_assemblyDefinition.MainModule.Types.Cast<TypeDefinition>().FirstOrDefault(t => t.FullName == fullTypeName); if (typeRef == null) { throw new InvalidOperationException(String.Format("No type defined with name '{0}'", fullTypeName)); } foreach (MethodDefinition methodDefinition in typeRef.Methods) { yield return methodDefinition; } }
private void FillAssemblyMethods(XAPAssembly xapAssembly) { foreach (var method in xapAssembly.GetMethods()) { var hook = new MethodHook(method) { LogMethodName = true, LogParameterValues = true, LogReturnValues = true }; m_hooks.Add(hook); } }