Tangerine.BLL.XAPAssembly.GetMethods C# (CSharp) Method

GetMethods() public method

public GetMethods ( string fullTypeName ) : IEnumerable
fullTypeName string
return IEnumerable
        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;
            }
        }

Same methods

XAPAssembly::GetMethods ( ) : IEnumerable

Usage Example

Ejemplo n.º 1
0
 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);
     }
 }