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); } }
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++; } }