示例#1
0
文件: Program.cs 项目: kerwon/dlr
 private static void DumpExtensionMethods(MetadataTables tables)
 {
     _output.WriteLine("Extension methods:");
     foreach (MethodDef em in tables.GetVisibleExtensionMethods())
     {
         TypeDef td = em.FindDeclaringType();
         _output.WriteLine("{0}.{1}::{2}", td.Namespace, td.Name, em.Name);
     }
 }
示例#2
0
文件: Program.cs 项目: kerwon/dlr
 private static void EnumerateExtensionMethods(MetadataTables tables)
 {
     foreach (MethodDef em in tables.GetVisibleExtensionMethods())
     {
         if (tables.Module != null)
         {
             var mb = tables.Module.ResolveMethod(em.Record.Token.Value);
         }
         Counter_ExtensionMethods++;
     }
 }