<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-34314</id>
	<title>Nabble - Mono - Cecil</title>
	<updated>2009-12-01T04:58:22Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Mono---Cecil-f34314.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono---Cecil-f34314.html" />
	<subtitle type="html">Groups about the &lt;a href=&quot;http://www.mono-project.com/Cecil&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono.Cecil&lt;/a&gt; library.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26591309</id>
	<title>Re: Cecil v2.0 Status? (was: Re: Lazy loading of  TypeDefinition)</title>
	<published>2009-12-01T04:58:22Z</published>
	<updated>2009-12-01T04:58:22Z</updated>
	<author>
		<name>Jb Evain-2</name>
	</author>
	<content type="html">Hey Philip,
&lt;br&gt;&lt;br&gt;On 11/20/09, Philip Laureano &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26591309&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;philip.laureano@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Any news regarding the next version of Cecil?
&lt;br&gt;&lt;br&gt;The first bits were rolled to some users that are doing reading
&lt;br&gt;specific stuff, and we're killing some bugs before making it more
&lt;br&gt;widely available. It's currently still missing the IL manipulation
&lt;br&gt;bits (Import and stuff to work on the IL stream), so it wouldn't be
&lt;br&gt;really useful for LinFu right now.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26591309&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cecil-v2.0-Status--%28was%3A-Re%3A-Lazy-loading-of--TypeDefinition%29-tp26451540p26591309.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26458460</id>
	<title>Finding overrides and implements</title>
	<published>2009-11-21T09:18:23Z</published>
	<updated>2009-11-21T09:18:23Z</updated>
	<author>
		<name>Harald Mueller-2</name>
	</author>
	<content type="html">Hi all -
&lt;br&gt;&lt;br&gt;If someone is interested, here (at the end of this posting) is the
&lt;br&gt;code I plan to use in my call graph machine. It is a modification of
&lt;br&gt;Mono.Linker.Steps.TypeMapStep, to which Jb pointed me.
&lt;br&gt;&lt;br&gt;The changes from the original code are:
&lt;br&gt;&lt;br&gt;(a) It's an abstract class that has an abstract OnFoundMatch(MethodDef
&lt;br&gt;@base, MethodDef @override). Therefore, a bunch of methods is now non-
&lt;br&gt;static.
&lt;br&gt;&lt;br&gt;(b) If there are more interfaces with a matching method,
&lt;br&gt;TypeMapStep.GetBaseMethodInInterfaceHierarchy returns the method of
&lt;br&gt;only the first interface. With a call graph, we need all matching
&lt;br&gt;methods in all base interfaces. Example:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; interface I1 { void M(); }
&lt;br&gt;&amp;nbsp; &amp;nbsp; interface I2 { void M(); }
&lt;br&gt;&amp;nbsp; &amp;nbsp; class C : I1, I2 { public void M() {} }
&lt;br&gt;&lt;br&gt;In this code, we want to know that C.M() implements I1.M() as well as
&lt;br&gt;I2.M().
&lt;br&gt;Therefore, GetBaseMethodInInterfaceHierarchy() now returns an
&lt;br&gt;IEnumerable&amp;lt;MethodDefinition&amp;gt;; and calls to it now iterate over the
&lt;br&gt;result.
&lt;br&gt;&lt;br&gt;(c) I also want to get all potential calls from &amp;quot;mixing in interface
&lt;br&gt;method implementations&amp;quot;, so I need also these &amp;quot;strange
&lt;br&gt;implementations.&amp;quot; Here is an example of valid C# code:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; interface I1 { void M(); }
&lt;br&gt;&amp;nbsp; &amp;nbsp; class C { public void M() {} }
&lt;br&gt;&amp;nbsp; &amp;nbsp; class CDerived : C {}
&lt;br&gt;&lt;br&gt;Here, I1.M() is implemented by C.M() in CDerived, although I1 and C do
&lt;br&gt;not have any direct knowledge of each other. To find all these cases,
&lt;br&gt;I added the following code to MapVirtualMethods:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Go to each base class ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var @base = GetBaseType(type); @base != null; @base =
&lt;br&gt;GetBaseType(@base)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (MethodDefinition method in @base.Methods) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!method.IsVirtual)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // ... and map its methods to the methods of all
&lt;br&gt;the current(!) type's interfaces.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MapVirtualInterfaceMethod(type, method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;To do this, I gave MapVirtualInterfaceMethod an additional parameter,
&lt;br&gt;namely the type from which it should take the implementation method;
&lt;br&gt;the single-parameter version of GetBaseMethodInInterfaceHierarchy
&lt;br&gt;became useless after this. In addition, the guard at the top of
&lt;br&gt;MapVirtualMethods which returns immediately if no methods are present
&lt;br&gt;is removed so that the new for loop runs also in this case (which is
&lt;br&gt;e.g. necessary for the given example).
&lt;br&gt;&lt;br&gt;----------
&lt;br&gt;&lt;br&gt;The code below does not handle everything perfectly - and moreover, I
&lt;br&gt;have not tested it except for some demo cases. Momentarily, the idea
&lt;br&gt;is not to miss any potential overrides; but maybe accept a few wrong
&lt;br&gt;ones. Here are two examples where the code gives a &amp;quot;false positive&amp;quot;:
&lt;br&gt;&lt;br&gt;a.
&lt;br&gt;&amp;nbsp; &amp;nbsp; interface I { void M(); }
&lt;br&gt;&amp;nbsp; &amp;nbsp; abstract class C {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public virtual void M() { }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; abstract class D : C { }
&lt;br&gt;&amp;nbsp; &amp;nbsp; abstract class E : D {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public new virtual void M() { }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; class F : E, I { }
&lt;br&gt;&lt;br&gt;Here, C.M() cannot implement I.M() if we make the &amp;quot;closed-world
&lt;br&gt;assumption&amp;quot; that we know all classes in the universe (which I assume
&lt;br&gt;with tools that look &amp;quot;downwards&amp;quot; in the inheritance tree). The
&lt;br&gt;MethodMatcher, yet, says that (a) C.M() implements I.M(); and (b) that
&lt;br&gt;E.M() overrides C.M(). Precise tracking of hidings is, I think,
&lt;br&gt;necessary to find out which methods are NOT overrides or implements in
&lt;br&gt;such cases.
&lt;br&gt;&lt;br&gt;b. An interesting piece of code in C#:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; interface I&amp;lt;T&amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; T M(T p);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; abstract class C&amp;lt;T&amp;gt; : I&amp;lt;T&amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public abstract T M(T p);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; abstract class D&amp;lt;T&amp;gt; : C&amp;lt;T&amp;gt;, I&amp;lt;int&amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public override T M(T p) { return p; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int M(int p) { return 10; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; class E : D&amp;lt;int&amp;gt; { }
&lt;br&gt;&lt;br&gt;Now, we can create an E and call M(5) on it. The interesting question
&lt;br&gt;then is: Which M() is called? ;-) ...
&lt;br&gt;&lt;br&gt;... there is a general rule somewhere that spelt-out parameter types
&lt;br&gt;are a better match than generic parameters. Therefore, the second
&lt;br&gt;method (where int is spelt out) is called. I found no way to call the
&lt;br&gt;first implementation of M in class D via an object of class E - is
&lt;br&gt;there one?
&lt;br&gt;&lt;br&gt;On the other hand, the current MethodMatcher says that also the first
&lt;br&gt;implementation implementents I&amp;lt;T&amp;gt;'s M() method - which is therefore
&lt;br&gt;&amp;quot;somewhat true&amp;quot; (leaving it out gives a compile time error) and
&lt;br&gt;&amp;quot;somewhat false&amp;quot; (a call to I&amp;lt;T&amp;gt; will never call that implementation
&lt;br&gt;[it appears]).
&lt;br&gt;&lt;br&gt;(With two interfaces, that sort of thing is NOT allowed:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; interface I&amp;lt;T&amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; T M(T p);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; abstract class D&amp;lt;T&amp;gt; : I&amp;lt;T&amp;gt;, I&amp;lt;int&amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public T M(T p) { return p; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int M(int p) { return 10; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; class E : D&amp;lt;int&amp;gt; { }
&lt;br&gt;&lt;br&gt;yields (in Visual Studio 2010 beta) Error: 'D&amp;lt;T&amp;gt;' cannot implement
&lt;br&gt;both 'I&amp;lt;int&amp;gt;' and 'I&amp;lt;T&amp;gt;' because they may unify for some type
&lt;br&gt;parameter substitutions. This does not even work if one specifies
&lt;br&gt;&amp;quot;where T : class&amp;quot; which would guarantee that T can never be int.)
&lt;br&gt;&lt;br&gt;Ok - so much for the moment. Below is the code.
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Harald M.
&lt;br&gt;&lt;br&gt;----------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; using System.Collections.Generic;
&lt;br&gt;&amp;nbsp; &amp;nbsp; using Mono.Cecil;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /// &amp;lt;summary&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; /// Resolution of overrides and implements of methods.
&lt;br&gt;&amp;nbsp; &amp;nbsp; /// Copied and modified from Mono's Mono.Linker.Steps.TypeMapStep
&lt;br&gt;by &amp;nbsp;Jb Evain (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26458460&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jbevain@...&lt;/a&gt;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; public abstract class MethodMatcher {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected abstract void OnFoundMatch(MethodDefinition @base,
&lt;br&gt;MethodDefinition @override);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void ProcessAssembly(AssemblyDefinition assembly) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (TypeDefinition type in assembly.MainModule.Types)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MapType(type);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void MapType(TypeDefinition type) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MapVirtualMethods(type);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void MapVirtualMethods(TypeDefinition type) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (MethodDefinition method in type.Methods) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!method.IsVirtual)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MapVirtualMethod(method);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (method.HasOverrides)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MapOverrides(method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Go to each base class ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var @base = GetBaseType(type); @base != null; @base =
&lt;br&gt;GetBaseType(@base)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (MethodDefinition method in @base.Methods) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!method.IsVirtual)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // ... and map its methods to the methods of all
&lt;br&gt;the current(!) type's interfaces.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MapVirtualInterfaceMethod(type, method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void MapVirtualMethod(MethodDefinition method) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MapVirtualBaseMethod(method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MapVirtualInterfaceMethod(method.DeclaringType, method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void MapVirtualBaseMethod(MethodDefinition method) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MethodDefinition @base = GetBaseMethodInTypeHierarchy
&lt;br&gt;(method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (@base == null)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AnnotateMethods(@base, method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void MapVirtualInterfaceMethod(TypeDefinition type,
&lt;br&gt;MethodDefinition method) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var @base in GetBaseMethodInInterfaceHierarchy
&lt;br&gt;(type, method))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AnnotateMethods(@base, method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void MapOverrides(MethodDefinition method) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (MethodReference overrideRef in method.Overrides)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MethodDefinition @override = overrideRef.Resolve();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (@override == null)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AnnotateMethods(@override, method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void AnnotateMethods(MethodDefinition @base, MethodDefinition
&lt;br&gt;@override) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OnFoundMatch(@base, @override);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static MethodDefinition GetBaseMethodInTypeHierarchy
&lt;br&gt;(MethodDefinition method) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TypeDefinition @base = GetBaseType(method.DeclaringType);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (@base != null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MethodDefinition baseMethod = TryMatchMethod(@base,
&lt;br&gt;method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (baseMethod != null)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return baseMethod;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @base = GetBaseType(@base);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static IEnumerable&amp;lt;MethodDefinition&amp;gt;
&lt;br&gt;GetBaseMethodInInterfaceHierarchy(TypeDefinition type,
&lt;br&gt;MethodDefinition method) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (TypeReference interfaceRef in type.Interfaces) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TypeDefinition @interface = interfaceRef.Resolve();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (@interface == null)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MethodDefinition baseMethod = TryMatchMethod
&lt;br&gt;(@interface, method);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (baseMethod != null)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield return baseMethod;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var md in GetBaseMethodInInterfaceHierarchy
&lt;br&gt;(@interface, method))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield return md;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static MethodDefinition TryMatchMethod(TypeDefinition type,
&lt;br&gt;MethodDefinition method) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!type.HasMethods)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (MethodDefinition candidate in type.Methods)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (MethodMatch(candidate, method))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return candidate;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static bool MethodMatch(MethodDefinition candidate,
&lt;br&gt;MethodDefinition method) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!candidate.IsVirtual)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (candidate.Name != method.Name)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!TypeMatch(candidate.ReturnType.ReturnType,
&lt;br&gt;method.ReturnType.ReturnType))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (candidate.Parameters.Count != method.Parameters.Count)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; candidate.Parameters.Count; i++)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!TypeMatch(candidate.Parameters[i].ParameterType,
&lt;br&gt;method.Parameters[i].ParameterType))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static bool TypeMatch(ModType a, ModType b) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!TypeMatch(a.ModifierType, b.ModifierType))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TypeMatch(a.ElementType, b.ElementType);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static bool TypeMatch(TypeSpecification a, TypeSpecification
&lt;br&gt;b) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (a is GenericInstanceType)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TypeMatch((GenericInstanceType)a,
&lt;br&gt;(GenericInstanceType)b);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (a is ModType)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TypeMatch((ModType)a, (ModType)b);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TypeMatch(a.ElementType, b.ElementType);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static bool TypeMatch(GenericInstanceType a,
&lt;br&gt;GenericInstanceType b) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!TypeMatch(a.ElementType, b.ElementType))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (a.GenericArguments.Count != b.GenericArguments.Count)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (a.GenericArguments.Count == 0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; a.GenericArguments.Count; i++)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!TypeMatch(a.GenericArguments[i],
&lt;br&gt;b.GenericArguments[i]))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static bool TypeMatch(TypeReference a, TypeReference b) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (a is GenericParameter)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (a is TypeSpecification || b is TypeSpecification) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (a.GetType() != b.GetType())
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TypeMatch((TypeSpecification)a,
&lt;br&gt;(TypeSpecification)b);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return a.FullName == b.FullName;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static TypeDefinition GetBaseType(TypeDefinition type) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (type == null || type.BaseType == null)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return type.BaseType.Resolve();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Finding-overrides-and-implements-tp26458460p26458460.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26451540</id>
	<title>Cecil v2.0 Status? (was: Re: Lazy loading of  TypeDefinition)</title>
	<published>2009-11-20T14:53:22Z</published>
	<updated>2009-11-20T14:53:22Z</updated>
	<author>
		<name>Philip_L</name>
	</author>
	<content type="html">Hi Jb,&lt;br&gt;&lt;br&gt;Any news regarding the next version of Cecil?&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 19, 2009 at 10:23 PM, Jb Evain &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451540&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

Hey Anatoly,&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
On 11/19/09, Anatoly &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451540&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;amspb1@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt;  For performace I&amp;#39;d like initially to load only type&amp;#39;s names/fullnames.&lt;br&gt;
&amp;gt;  The other information (fields, properties,methods) I&amp;#39;d like to load&lt;br&gt;
&amp;gt;  later (when considering the given type). Is this scenario possible in&lt;br&gt;
&amp;gt;  Mono.Cecil?&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;Right now Cecil aggresively loads everything. Its next version is&lt;br&gt;
allows you to load metadata lazily. I suggest you use the current&lt;br&gt;
version of Cecil, and try the next version as soon as it&amp;#39;s out.&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
Jb Evain  &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451540&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;
mono-cecil&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;

&lt;p&gt;&lt;/p&gt;

-- &lt;br /&gt;
--&lt;br /&gt;
mono-cecil</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cecil-v2.0-Status--%28was%3A-Re%3A-Lazy-loading-of--TypeDefinition%29-tp26451540p26451540.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26427199</id>
	<title>Re: Lazy loading of TypeDefinition</title>
	<published>2009-11-19T06:23:57Z</published>
	<updated>2009-11-19T06:23:57Z</updated>
	<author>
		<name>Jb Evain-2</name>
	</author>
	<content type="html">Hey Anatoly,
&lt;br&gt;&lt;br&gt;On 11/19/09, Anatoly &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26427199&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;amspb1@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;nbsp;For performace I'd like initially to load only type's names/fullnames.
&lt;br&gt;&amp;gt; &amp;nbsp;The other information (fields, properties,methods) I'd like to load
&lt;br&gt;&amp;gt; &amp;nbsp;later (when considering the given type). Is this scenario possible in
&lt;br&gt;&amp;gt; &amp;nbsp;Mono.Cecil?
&lt;br&gt;&lt;br&gt;Right now Cecil aggresively loads everything. Its next version is
&lt;br&gt;allows you to load metadata lazily. I suggest you use the current
&lt;br&gt;version of Cecil, and try the next version as soon as it's out.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26427199&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Lazy-loading-of-TypeDefinition-tp26426881p26427199.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26427166</id>
	<title>Re: Lazy loading of TypeDefinition</title>
	<published>2009-11-19T06:22:11Z</published>
	<updated>2009-11-19T06:22:11Z</updated>
	<author>
		<name>Lotfi Gheribi</name>
	</author>
	<content type="html">Mono does not contain APIs for getting such information without loading the type hierarchy. &lt;br&gt;However, it uses lazy loading for other stuff like method bodies...&lt;br&gt;&lt;br&gt;If performance is an absolute requirement, you may consider implementing your own optimized routines&lt;br&gt;

&lt;p&gt;&lt;/p&gt;

-- &lt;br /&gt;
--&lt;br /&gt;
mono-cecil</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Lazy-loading-of-TypeDefinition-tp26426881p26427166.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26426881</id>
	<title>Lazy loading of TypeDefinition</title>
	<published>2009-11-19T06:04:53Z</published>
	<updated>2009-11-19T06:04:53Z</updated>
	<author>
		<name>Anatoly-6</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;For performace I'd like initially to load only type's names/fullnames.
&lt;br&gt;The other information (fields, properties,methods) I'd like to load
&lt;br&gt;later (when considering the given type). Is this scenario possible in
&lt;br&gt;Mono.Cecil?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Lazy-loading-of-TypeDefinition-tp26426881p26426881.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26396977</id>
	<title>Re: Code or info to find overridden, implemented, and  overriding methods</title>
	<published>2009-11-17T12:28:04Z</published>
	<updated>2009-11-17T12:28:04Z</updated>
	<author>
		<name>Harald Mueller-2</name>
	</author>
	<content type="html">Thanks - I'll dive into it ...
&lt;br&gt;Regards
&lt;br&gt;Harald
&lt;br&gt;&lt;br&gt;-------- Original-Nachricht --------
&lt;br&gt;&amp;gt; Datum: Tue, 17 Nov 2009 18:08:30 +0100
&lt;br&gt;&amp;gt; Von: Jb Evain &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26396977&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; An: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26396977&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Betreff: Re: [mono-cecil] Code or info to find overridden, implemented, and 	overriding methods
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hey Harold,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On 11/17/09, Harald M. &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26396977&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;harald_m_mueller@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;If someone could give me a pointer to such code (e.g. in Gendarme?),
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;I'd be happy ... and of course willing to post back any knowledge I
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;might gain :-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You can have a look at the code in the linker which creates a map of
&lt;br&gt;&amp;gt; all methods that are base method or that override methods:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://anonsvn.mono-project.com/source/trunk/mcs/tools/linker/Mono.Linker.Steps/TypeMapStep.cs&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://anonsvn.mono-project.com/source/trunk/mcs/tools/linker/Mono.Linker.Steps/TypeMapStep.cs&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26396977&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; mono-cecil
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
&lt;br&gt;Jetzt freischalten unter &lt;a href=&quot;http://portal.gmx.net/de/go/maxdome01&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://portal.gmx.net/de/go/maxdome01&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Code-or-info-to-find-overridden%2C-implemented%2C-and--overriding-methods-tp26392845p26396977.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26396970</id>
	<title>Re: Code or info to find overridden, implemented, and  overriding methods</title>
	<published>2009-11-17T12:27:33Z</published>
	<updated>2009-11-17T12:27:33Z</updated>
	<author>
		<name>Harald Mueller-2</name>
	</author>
	<content type="html">No problem :-) !!!
&lt;br&gt;-------- Original-Nachricht --------
&lt;br&gt;&amp;gt; Datum: Tue, 17 Nov 2009 18:09:02 +0100
&lt;br&gt;&amp;gt; Von: Jb Evain &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26396970&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; An: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26396970&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Betreff: Re: [mono-cecil] Code or info to find overridden, implemented, and 	overriding methods
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 11/17/09, Jb Evain &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26396970&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hey Harold,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Sorry, Harald, I hit send too fast.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26396970&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; mono-cecil
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
&lt;br&gt;sicherer, schneller und einfacher! &lt;a href=&quot;http://portal.gmx.net/de/go/chbrowser&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://portal.gmx.net/de/go/chbrowser&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Code-or-info-to-find-overridden%2C-implemented%2C-and--overriding-methods-tp26392845p26396970.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26393719</id>
	<title>Re: Code or info to find overridden, implemented, and  overriding methods</title>
	<published>2009-11-17T09:09:02Z</published>
	<updated>2009-11-17T09:09:02Z</updated>
	<author>
		<name>Jb Evain-2</name>
	</author>
	<content type="html">On 11/17/09, Jb Evain &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26393719&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Hey Harold,
&lt;br&gt;&lt;br&gt;Sorry, Harald, I hit send too fast.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26393719&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Code-or-info-to-find-overridden%2C-implemented%2C-and--overriding-methods-tp26392845p26393719.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26393708</id>
	<title>Re: Code or info to find overridden, implemented, and  overriding methods</title>
	<published>2009-11-17T09:08:30Z</published>
	<updated>2009-11-17T09:08:30Z</updated>
	<author>
		<name>Jb Evain-2</name>
	</author>
	<content type="html">Hey Harold,
&lt;br&gt;&lt;br&gt;On 11/17/09, Harald M. &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26393708&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;harald_m_mueller@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;nbsp;If someone could give me a pointer to such code (e.g. in Gendarme?),
&lt;br&gt;&amp;gt; &amp;nbsp;I'd be happy ... and of course willing to post back any knowledge I
&lt;br&gt;&amp;gt; &amp;nbsp;might gain :-)
&lt;br&gt;&lt;br&gt;You can have a look at the code in the linker which creates a map of
&lt;br&gt;all methods that are base method or that override methods:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://anonsvn.mono-project.com/source/trunk/mcs/tools/linker/Mono.Linker.Steps/TypeMapStep.cs&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://anonsvn.mono-project.com/source/trunk/mcs/tools/linker/Mono.Linker.Steps/TypeMapStep.cs&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26393708&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Code-or-info-to-find-overridden%2C-implemented%2C-and--overriding-methods-tp26392845p26393708.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26392845</id>
	<title>Code or info to find overridden, implemented, and  overriding methods</title>
	<published>2009-11-17T07:48:04Z</published>
	<updated>2009-11-17T07:48:04Z</updated>
	<author>
		<name>Harald Mueller-2</name>
	</author>
	<content type="html">Hello -
&lt;br&gt;&lt;br&gt;I'm writing a call graph detector. It will, in its first version, show
&lt;br&gt;&amp;quot;potential calls&amp;quot; = calls to all overriding methods.
&lt;br&gt;I'll have to write code to find those methods, also over assembly
&lt;br&gt;boundaries.
&lt;br&gt;&lt;br&gt;I'd like to take a look at code that already does this, as it
&lt;br&gt;obviously not that easy (e.g. the cases shown in
&lt;br&gt;&lt;a href=&quot;http://groups.google.com/group/mono-cecil/msg/5f69e80a2c7e7240&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mono-cecil/msg/5f69e80a2c7e7240&lt;/a&gt;&amp;nbsp;).
&lt;br&gt;&lt;br&gt;If someone could give me a pointer to such code (e.g. in Gendarme?),
&lt;br&gt;I'd be happy ... and of course willing to post back any knowledge I
&lt;br&gt;might gain :-)
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;Harald M.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Code-or-info-to-find-overridden%2C-implemented%2C-and--overriding-methods-tp26392845p26392845.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26303484</id>
	<title>Re: Bug in reflection of IList&lt;T&gt;?</title>
	<published>2009-11-11T07:43:21Z</published>
	<updated>2009-11-11T07:43:21Z</updated>
	<author>
		<name>Anatoly-6</name>
	</author>
	<content type="html">&lt;br&gt;Hello,
&lt;br&gt;Thanks! It helps!
&lt;br&gt;&lt;br&gt;Anatoly
&lt;br&gt;&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-in-reflection-of-IList%3CT%3E--tp26285503p26303484.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26286322</id>
	<title>Re: Bug in reflection of IList&lt;T&gt;?</title>
	<published>2009-11-10T08:16:27Z</published>
	<updated>2009-11-10T08:16:27Z</updated>
	<author>
		<name>Jb Evain-2</name>
	</author>
	<content type="html">&lt;br&gt;Hey,
&lt;br&gt;&lt;br&gt;On 11/10/09, Anatoly &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26286322&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;amspb1@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;nbsp;I've got TypeDefinition of IList&amp;lt;T&amp;gt;. Then I examine Interfaces
&lt;br&gt;&amp;gt; &amp;nbsp;property. There is ICollection&amp;lt;TKey&amp;gt; type reference there. It's
&lt;br&gt;&amp;gt; &amp;nbsp;strange because no TKey generic parameter presents in IList&amp;lt;T&amp;gt;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;How to solve this problem?
&lt;br&gt;&lt;br&gt;That's not the case with Cecil from svn. Try with a fresh Cecil from
&lt;br&gt;the Mono daily build.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26286322&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-in-reflection-of-IList%3CT%3E--tp26285503p26286322.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26285503</id>
	<title>Bug in reflection of IList&lt;T&gt;?</title>
	<published>2009-11-10T07:25:43Z</published>
	<updated>2009-11-10T07:25:43Z</updated>
	<author>
		<name>Anatoly-6</name>
	</author>
	<content type="html">&lt;br&gt;Hello
&lt;br&gt;I've got TypeDefinition of IList&amp;lt;T&amp;gt;. Then I examine Interfaces
&lt;br&gt;property. There is ICollection&amp;lt;TKey&amp;gt; type reference there. It's
&lt;br&gt;strange because no TKey generic parameter presents in IList&amp;lt;T&amp;gt;.
&lt;br&gt;&lt;br&gt;How to solve this problem?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Anatoly
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-in-reflection-of-IList%3CT%3E--tp26285503p26285503.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26266153</id>
	<title>Re: Metadata schema in .NET 4.0</title>
	<published>2009-11-09T05:09:31Z</published>
	<updated>2009-11-09T05:09:31Z</updated>
	<author>
		<name>nikov</name>
	</author>
	<content type="html">Thanks, Jb.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Nov 9, 2009 at 4:04 PM, Jb Evain &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266153&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;

&lt;br&gt;
Hey Vladimir,&lt;br&gt;
&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
On 11/9/09, Vladimir Reshetnikov &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266153&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;v.reshetnikov@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; Does anybody know, are there any publicly announced changes in image format&lt;br&gt;
&amp;gt; and metadata schema in .NET 4.0?&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;Nope, it&amp;#39;s the same as .net 2.0. Only the metadata version changes to&lt;br&gt;
a v4.X. Where X is not determined for the final build.&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
Jb Evain  &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266153&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Metadata-schema-in-.NET-4.0-tp26266002p26266153.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26266096</id>
	<title>Re: Metadata schema in .NET 4.0</title>
	<published>2009-11-09T05:04:25Z</published>
	<updated>2009-11-09T05:04:25Z</updated>
	<author>
		<name>Jb Evain-2</name>
	</author>
	<content type="html">&lt;br&gt;Hey Vladimir,
&lt;br&gt;&lt;br&gt;On 11/9/09, Vladimir Reshetnikov &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266096&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;v.reshetnikov@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Does anybody know, are there any publicly announced changes in image format
&lt;br&gt;&amp;gt; and metadata schema in .NET 4.0?
&lt;br&gt;&lt;br&gt;Nope, it's the same as .net 2.0. Only the metadata version changes to
&lt;br&gt;a v4.X. Where X is not determined for the final build.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266096&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Metadata-schema-in-.NET-4.0-tp26266002p26266096.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26266002</id>
	<title>Metadata schema in .NET 4.0</title>
	<published>2009-11-09T04:55:57Z</published>
	<updated>2009-11-09T04:55:57Z</updated>
	<author>
		<name>nikov</name>
	</author>
	<content type="html">Hi,&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Does anybody know, are there any publicly announced changes in image format and metadata schema in .NET 4.0?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks,&lt;/div&gt;&lt;div&gt;Vladimir&lt;/div&gt;&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Metadata-schema-in-.NET-4.0-tp26266002p26266002.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26133773</id>
	<title>more performance issues</title>
	<published>2009-10-30T10:13:12Z</published>
	<updated>2009-10-30T10:13:12Z</updated>
	<author>
		<name>Dirk Bonné</name>
	</author>
	<content type="html">Hi &lt;br&gt;&lt;br&gt;Sorry to bother you again about performance, but I just did a profile on our assembly generator and a lot of time goes into getting the properties values and calling methods of the Type object using reflection. Examples are in ReflectionHelper:&lt;br&gt;
&lt;br&gt;        public static bool IsGenericType (Type t)&lt;br&gt;        {&lt;br&gt;            return GetProperty (t, &amp;quot;IsGenericType&amp;quot;);&lt;br&gt;        }&lt;br&gt;&lt;br&gt;&lt;br&gt;What is the reason for calling members of Type using Invoke? The library could be faster if a direct call is made. I did a test by changing all the reflected calls in ReflectionHelper.cs and our generator got 20% faster (after the change saving the assembly takes now takes most of the time: 65%).&lt;br&gt;
&lt;br&gt;regards&lt;br&gt;Dirk&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/more-performance-issues-tp26133773p26133773.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26133198</id>
	<title>performance problems when Import</title>
	<published>2009-10-30T09:33:26Z</published>
	<updated>2009-10-30T09:33:26Z</updated>
	<author>
		<name>Dirk Bonné</name>
	</author>
	<content type="html">Hi&lt;br&gt;&lt;br&gt;When Importing symbols (FieldReference, MethodReference, etc..) cecil gets very slow when the number of references already in the Module is great. Cecil searches the MemberReferences list linear to see if that reference was already added. This is very slow. I made a test when generation a largish assembly:&lt;br&gt;
* 48 seconds with a plain cecil&lt;br&gt;* 6 seconds when I add a HashTable to the MethodReferences class for a fast lookup of the signature.&lt;br&gt;(note: In this test I already optimized the calling of Import so I only call it once for every MethodReference)&lt;br&gt;
&lt;br&gt;Is there interest in getting the Import method faster? &lt;br&gt;&lt;br&gt;I used an additional HashTable, but more memory efficient would be to only use a HashTable and not a list anymore, but in that case the order of the references won&amp;#39;t be preserved. Is this important? And do the maintainers of cecil have an interest in me providing a patch? &lt;br&gt;
&lt;br&gt;regards, &lt;br&gt;Dirk&lt;br&gt;&lt;br&gt;&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/performance-problems-when-Import-tp26133198p26133198.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26115887</id>
	<title>bug: creating a reference to a constructor of a instantiated generic  type</title>
	<published>2009-10-29T08:59:51Z</published>
	<updated>2009-10-29T08:59:51Z</updated>
	<author>
		<name>Dirk Bonné</name>
	</author>
	<content type="html">Hi,&lt;br&gt;&lt;br&gt;I have come across a bug that has been on the mailing list before but no solution was put forward:&lt;br&gt;&lt;br&gt;  public class Y {}&lt;br&gt;  public class X&amp;lt;T&amp;gt; { &lt;br&gt;    public X(T x)&lt;br&gt;    {&lt;br&gt;    }&lt;br&gt;  }&lt;br&gt;&lt;br&gt;
&lt;br&gt;    var assDef = AssemblyFactory.DefineAssembly(&amp;quot;test&amp;quot;, &amp;quot;test&amp;quot;, TargetRuntime.NET_2_0, AssemblyKind.Dll);&lt;br&gt;    var module = assDef.MainModule;&lt;br&gt;    var ci = module.Import(typeof(X&amp;lt;Y&amp;gt;).GetConstructors()[0]);&lt;br&gt;
      &lt;br&gt;&lt;br&gt;Will return a MethodReference like this:&lt;br&gt;&lt;br&gt;  System.Void X`1&amp;lt;Y&amp;gt;::.ctor(Y)&lt;br&gt;&lt;br&gt;But what should be emitted is:&lt;br&gt;&lt;br&gt;  System.Void X`1&amp;lt;Y&amp;gt;::.ctor(!0)&lt;br&gt;&lt;br&gt;I think the bug is in  ReflectionHelper.ImportMethodBase wioth the for loop &lt;br&gt;
&lt;br&gt;&lt;br&gt;              SR.ParameterInfo[] parameters = mb.GetParameters();&lt;br&gt;              for(int i = 0; i &amp;lt; parameters.Length; i++)&lt;br&gt;                meth.Parameters.Add(new ParameterDefinition(&lt;br&gt;                    ImportSystemType(parameters[i].ParameterType, context)));&lt;br&gt;
            }&lt;br&gt;&lt;br&gt;To get around this I made a quickfix&lt;br&gt;&lt;br&gt;            if(mb.DeclaringType.IsGenericType) {&lt;br&gt;              bool isConstructor = mb is SR.ConstructorInfo;&lt;br&gt;              SR.MethodBase[] mbList = isConstructor ? (SR.MethodBase[])mb.DeclaringType.GetConstructors() : mb.DeclaringType.GetMethods();&lt;br&gt;
              int pos = Array.IndexOf(mbList, mb);&lt;br&gt;              Type openType = mb.DeclaringType.GetGenericTypeDefinition();&lt;br&gt;              SR.MethodBase openMb = (isConstructor ? (SR.MethodBase[])openType.GetConstructors() : openType.GetMethods())[pos];&lt;br&gt;
              SR.ParameterInfo[] parameters = openMb.GetParameters();&lt;br&gt;              GenericInstanceType git = (GenericInstanceType)meth.DeclaringType;&lt;br&gt;              // this is not correct - what if the method is generic, what if it is generic in a generic in a generic etc.. &lt;br&gt;
              foreach(SR.ParameterInfo pi in parameters) {&lt;br&gt;                Type pType = pi.ParameterType;&lt;br&gt;                if(pType.IsGenericParameter) {&lt;br&gt;                  meth.Parameters.Add(new ParameterDefinition(git.ElementType.GenericParameters[pType.GenericParameterPosition]));&lt;br&gt;
                } else {&lt;br&gt;                  meth.Parameters.Add(new ParameterDefinition(ImportSystemType(pType, context)));&lt;br&gt;                }&lt;br&gt;              }&lt;br&gt;            } else {&lt;br&gt;              SR.ParameterInfo[] parameters = mb.GetParameters();&lt;br&gt;
              for(int i = 0; i &amp;lt; parameters.Length; i++)&lt;br&gt;                meth.Parameters.Add(new ParameterDefinition(&lt;br&gt;                    ImportSystemType(parameters[i].ParameterType, context)));&lt;br&gt;            }&lt;br&gt;
&lt;br&gt;Is there a way to improve this? Include a better version in cecil?&lt;br&gt;&lt;br&gt;regards,&lt;br&gt;Dirk&lt;br&gt;&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bug%3A-creating-a-reference-to-a-constructor-of-a-instantiated-generic--type-tp26115887p26115887.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26086256</id>
	<title>Saving symbols causes invalid metadata header</title>
	<published>2009-10-27T15:25:42Z</published>
	<updated>2009-10-27T15:25:42Z</updated>
	<author>
		<name>Brandon Cuff</name>
	</author>
	<content type="html">I'm using Mono.Cecil to add some generated types to an assembly. I would like to preserve the debug information. However when I load and store symbols using Mono.Cecil.Pdb, the assembly's metadata header gets messed up. Reflector produces this message - &amp;quot;Common.Test, Invalid 'BSJB' signature in Metadata header.&amp;quot; I generated one assembly with symbols and one without and compared the two and noticed a slight difference in the headers.
&lt;br&gt;&lt;br&gt;Any idea why they're being written differently?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&amp;nbsp;- Brandon</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Saving-symbols-causes-invalid-metadata-header-tp26086256p26086256.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25974892</id>
	<title>Re: is ModuleDefinition.Import on nullable bool correct?</title>
	<published>2009-10-20T06:12:52Z</published>
	<updated>2009-10-20T06:12:52Z</updated>
	<author>
		<name>Dirk Bonné</name>
	</author>
	<content type="html">&lt;br&gt;Ok forget it, I just tried the SVN version and there it works. Sorry to
&lt;br&gt;bother you all :(
&lt;br&gt;&lt;br&gt;regards,
&lt;br&gt;Dirk
&lt;br&gt;&lt;br&gt;Dirk Bonné wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I noticed a problem when trying importing a nullable bool:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;[Test]
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public void ImportNullable()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; var assDef = AssemblyFactory.DefineAssembly(&amp;quot;test&amp;quot;, &amp;quot;test&amp;quot;,
&lt;br&gt;&amp;gt; TargetRuntime.NET_2_0, AssemblyKind.Dll);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; var tr = assDef.MainModule.Import(typeof(bool?));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Assert.IsTrue(tr.IsValueType);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I would expect IsValueType to return true for &amp;quot;bool?&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is this a bug?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I fell over that when generating properties/fields with nullable
&lt;br&gt;&amp;gt; types, and it may be the cause of a type loader exception.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any ideas to get around this?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; regards
&lt;br&gt;&amp;gt; Dirk
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/is-ModuleDefinition.Import-on-nullable-bool-correct--tp25974565p25974892.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25974565</id>
	<title>is ModuleDefinition.Import on nullable bool correct?</title>
	<published>2009-10-20T05:48:57Z</published>
	<updated>2009-10-20T05:48:57Z</updated>
	<author>
		<name>Dirk Bonné</name>
	</author>
	<content type="html">&lt;br&gt;Hi
&lt;br&gt;&lt;br&gt;I noticed a problem when trying importing a nullable bool:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;[Test]
&lt;br&gt;&amp;nbsp; &amp;nbsp; public void ImportNullable()
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var assDef = AssemblyFactory.DefineAssembly(&amp;quot;test&amp;quot;, &amp;quot;test&amp;quot;,
&lt;br&gt;TargetRuntime.NET_2_0, AssemblyKind.Dll);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var tr = assDef.MainModule.Import(typeof(bool?));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Assert.IsTrue(tr.IsValueType);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;I would expect IsValueType to return true for &amp;quot;bool?&amp;quot;.
&lt;br&gt;&lt;br&gt;Is this a bug?
&lt;br&gt;&lt;br&gt;I fell over that when generating properties/fields with nullable
&lt;br&gt;types, and it may be the cause of a type loader exception.
&lt;br&gt;&lt;br&gt;Any ideas to get around this?
&lt;br&gt;&lt;br&gt;regards
&lt;br&gt;Dirk
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/is-ModuleDefinition.Import-on-nullable-bool-correct--tp25974565p25974565.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25851731</id>
	<title>Re: type of Exception thrown</title>
	<published>2009-10-12T00:50:52Z</published>
	<updated>2009-10-12T00:50:52Z</updated>
	<author>
		<name>yeeen</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=text/html;charset=utf-8 http-equiv=Content-Type&gt;
&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY style=&quot;PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px&quot; id=MailContainerBody leftMargin=0 topMargin=0 bgColor=#ffffff CanvasTabStop=&quot;true&quot; name=&quot;Compose message area&quot;&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;May I&amp;nbsp;how do u use this option (can u 
provide an example)?&amp;nbsp;After the exception is found, how do u print it 
out?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Thanks.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV style=&quot;FONT: 10pt Tahoma&quot;&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV style=&quot;BACKGROUND: #f5f5f5&quot;&gt;
&lt;DIV style=&quot;font-color: black&quot;&gt;&lt;B&gt;From:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25851731&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jonpryor@...&lt;/a&gt; &lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Sent:&lt;/B&gt; Saturday, October 10, 2009 10:50 PM&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;To:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25851731&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt; &lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Cc:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25851731&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt; &lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Subject:&lt;/B&gt; [mono-cecil] Re: type of Exception thrown&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style=&quot;-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)&quot; class=Apple-style-span&gt;On Oct 10, 2009, at 5:52 AM, Wee Li Yen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25851731&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;weeliyen@...&lt;/a&gt;&amp;gt; 
wrote:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;BLOCKQUOTE type=&quot;cite&quot;&gt;
  &lt;DIV&gt;
  &lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Is there anyway I can&amp;nbsp;detect what type of 
  Exception I have thrown?&lt;SPAN style=&quot;FONT-FAMILY: Helvetica; COLOR: rgb(0,0,0); FONT-SIZE: 17px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)&quot; class=Apple-style-span&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;SPAN style=&quot;FONT-FAMILY: Verdana; COLOR: rgb(0,35,163); FONT-SIZE: 15px&quot; class=Apple-style-span&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style=&quot;FONT-FAMILY: Verdana; COLOR: rgb(0,35,163); FONT-SIZE: 15px&quot; class=Apple-style-span&gt;Yes, but it's not easy. You meed to track which type is 
on the top of the call stack at the point of the throw, and since that could be 
the result of a method call you'll need to follow all method calls. Furthermore, 
due to runtime conditionals you may find more than one potential 
type&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR&gt;mdoc[0, 1] provides vaguely similar functionality through 
the 'mdoc update --exceptions' option, but does this by instead tracking which 
exception types are created (which is an easier though incorrect algorithm). 
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;- Jon&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;[0]&amp;nbsp;&lt;A href=&quot;http://go-mono.com/docs/monodoc.ashx?link=man:mdoc-update(1)&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;A href=&quot;http://go-mono.com/docs/monodoc.ashx?link=man:mdoc-update(1)&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://go-mono.com/docs/monodoc.ashx?link=man:mdoc-update(1)&lt;/A&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;[1]&amp;nbsp;&lt;A href=&quot;http://anonsvn.mono-project.com/viewvc/trunk/mcs/tools/mdoc/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;A href=&quot;http://anonsvn.mono-project.com/viewvc/trunk/mcs/tools/mdoc/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://anonsvn.mono-project.com/viewvc/trunk/mcs/tools/mdoc/&lt;/A&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;BR&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/type-of-Exception-thrown-tp25832625p25851731.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25834897</id>
	<title>Re: type of Exception thrown</title>
	<published>2009-10-10T07:50:14Z</published>
	<updated>2009-10-10T07:50:14Z</updated>
	<author>
		<name>Jonathan Pryor</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body bgcolor=&quot;#FFFFFF&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); &quot;&gt;On Oct 10, 2009, at 5:52 AM, Wee Li Yen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25834897&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;weeliyen@...&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div&gt;

&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;Is there anyway I can&amp;nbsp;detect what type of 
Exception I have thrown?&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: Helvetica; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); font-size: 17px; &quot;&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 35, 163); font-family: Verdana; font-size: 15px;&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 35, 163); font-family: Verdana; font-size: 15px;&quot;&gt;Yes, but it's not easy. You meed to track which type is on the top of the call stack at the point of the throw, and since that could be the result of a method call you'll need to follow all method calls. Furthermore, due to runtime conditionals you may find more than one potential type&lt;/span&gt;&lt;/div&gt;&lt;br&gt;mdoc[0, 1] provides vaguely similar functionality through the 'mdoc update --exceptions' option, but does this by instead tracking which exception types are created (which is an easier though incorrect algorithm).&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;- Jon&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;[0]&amp;nbsp;&lt;a href=&quot;http://go-mono.com/docs/monodoc.ashx?link=man:mdoc-update(1)&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;a href=&quot;http://go-mono.com/docs/monodoc.ashx?link=man:mdoc-update(1)&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://go-mono.com/docs/monodoc.ashx?link=man:mdoc-update(1)&lt;/a&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;[1]&amp;nbsp;&lt;a href=&quot;http://anonsvn.mono-project.com/viewvc/trunk/mcs/tools/mdoc/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;a href=&quot;http://anonsvn.mono-project.com/viewvc/trunk/mcs/tools/mdoc/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://anonsvn.mono-project.com/viewvc/trunk/mcs/tools/mdoc/&lt;/a&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;/body&gt;&lt;/html&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/type-of-Exception-thrown-tp25832625p25834897.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25832625</id>
	<title>type of Exception thrown</title>
	<published>2009-10-10T02:52:29Z</published>
	<updated>2009-10-10T02:52:29Z</updated>
	<author>
		<name>yeeen</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=text/html;charset=iso-8859-1 http-equiv=Content-Type&gt;
&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY style=&quot;PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px&quot; id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop=&quot;true&quot; name=&quot;Compose message area&quot;&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Is there anyway I can&amp;nbsp;detect what type of 
Exception I have thrown?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Currently I am only able to detect that I have 
thrown an Exception, but checking if the opcode of the instruction is &quot;throw&quot; or 
&quot;rethrow&quot;, but I can't detect the type of Exception I have thrown. I can get 
info from some other instruction through its operand, but throw/rethrow don't hv 
operand.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Thanks.&lt;/FONT&gt;&lt;/DIV&gt;&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/type-of-Exception-thrown-tp25832625p25832625.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25763217</id>
	<title>Re: What are the following constructs in Mono.Cecil  referring to in C#?</title>
	<published>2009-10-05T22:41:25Z</published>
	<updated>2009-10-05T22:41:25Z</updated>
	<author>
		<name>Fabian Schmied</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt;&amp;gt; I suggest you have a look at the ECMA-335 document. Cecil is basically
&lt;br&gt;&amp;gt;&amp;gt; mapping the metadata layout that is decribed is the document into an
&lt;br&gt;&amp;gt;&amp;gt; objet model.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Can u tell me more specifically where should I look at? I search for
&lt;br&gt;&amp;gt; &amp;quot;metadata&amp;quot; but still can't find the info I want.
&lt;br&gt;&lt;br&gt;Partition II ( Metadata definition and semantics); most notably
&lt;br&gt;chapter 22 (Metadata logical format: tables). (That's from the 4th
&lt;br&gt;edition from June 2006.)
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Fabian
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; --------------------------------------------------
&lt;br&gt;&amp;gt; From: &amp;quot;Jb Evain&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25763217&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sent: Sunday, October 04, 2009 11:25 PM
&lt;br&gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25763217&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: [mono-cecil] Re: What are the following constructs in Mono.Cecil
&lt;br&gt;&amp;gt; referring to in C#?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hey,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 10/4/09, Wee Li Yen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25763217&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;weeliyen@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Can someone explain what are these referring to in Mono.Cecil?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; TypeReference, ExternType, Override, NestedType, PInvokeInfo,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; SecurityDeclaration and CustomAttribute and MarshalSpec
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Best if can illustrate with examples.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I suggest you have a look at the ECMA-335 document. Cecil is basically
&lt;br&gt;&amp;gt;&amp;gt; mapping the metadata layout that is decribed is the document into an
&lt;br&gt;&amp;gt;&amp;gt; objet model.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; What is TerminateModuleDefinition doing in BaseReflectionVisitor? What is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the use and how to call it?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The visitor pattern implemented in Cecil is kind of broken. I strongly
&lt;br&gt;&amp;gt;&amp;gt; suggest you avoid using it, and implement your own visit mechanism. In
&lt;br&gt;&amp;gt;&amp;gt; this particular case, it's just a method called after a module
&lt;br&gt;&amp;gt;&amp;gt; definition has been completely visited.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Jb Evain  &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25763217&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/What-are-the-following-constructs-in-Mono.Cecil-referring-to-in-C---tp25738631p25763217.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25761379</id>
	<title>Re: Difference btn MethodReference and MethodDefinition?</title>
	<published>2009-10-05T17:42:15Z</published>
	<updated>2009-10-05T17:42:15Z</updated>
	<author>
		<name>yeeen</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=text/html;charset=utf-8 http-equiv=Content-Type&gt;
&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY style=&quot;PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px&quot; id=MailContainerBody leftMargin=0 topMargin=0 bgColor=#ffffff CanvasTabStop=&quot;true&quot; name=&quot;Compose message area&quot;&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Thanks for ur reply.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;FONT size=3 face=&quot;Times New Roman&quot;&gt;I don't quite 
understand &quot;A MethodDefinition is the actual method itself, thus allowing access 
to the method's IL, etc.&lt;/FONT&gt;&quot;.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Cos I did more printings of the instructions' 
opcodes and operands&amp;nbsp;of those method calls today and realised that 
MethodDefintion seems to be in the same assembly, just opp of what 
MethodReference is.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Li Yen&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV style=&quot;FONT: 10pt Tahoma&quot;&gt;
&lt;DIV style=&quot;BACKGROUND: #f5f5f5&quot;&gt;
&lt;DIV style=&quot;font-color: black&quot;&gt;&lt;B&gt;From:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25761379&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jonpryor@...&lt;/a&gt; &lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Sent:&lt;/B&gt; Monday, October 05, 2009 8:49 PM&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;To:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25761379&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt; &lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Cc:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25761379&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt; &lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Subject:&lt;/B&gt; [mono-cecil] Re: Difference btn MethodReference and 
MethodDefinition?&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style=&quot;-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)&quot; class=Apple-style-span&gt;On Oct 5, 2009, at 8:11 AM, Wee Li Yen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25761379&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;weeliyen@...&lt;/a&gt;&amp;gt; wrote:&lt;SPAN style=&quot;-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)&quot; class=Apple-style-span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BLOCKQUOTE type=&quot;cite&quot;&gt;
  &lt;DIV&gt;
  &lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;What is the difference btn a MethodReference 
  and MethodDefinition?&lt;SPAN style=&quot;FONT-FAMILY: Helvetica; COLOR: rgb(0,0,0); FONT-SIZE: 17px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)&quot; class=Apple-style-span&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;SPAN style=&quot;FONT-FAMILY: Verdana; COLOR: rgb(0,35,163); FONT-SIZE: 15px&quot; class=Apple-style-span&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/DIV&gt;A MethodReference is a reference to a 
method, which may be defined in another assembly (e.g. a call to 
Console.WriteLine() from yor app). 
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;A MethodDefinition is the actual method itself, thus allowing access to the 
method's IL, etc.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;- Jon&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;BR&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Difference-btn-MethodReference-and-MethodDefinition--tp25749655p25761379.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25750636</id>
	<title>Re: What are the following constructs in Mono.Cecil referring to in C#?</title>
	<published>2009-10-05T06:13:05Z</published>
	<updated>2009-10-05T06:13:05Z</updated>
	<author>
		<name>Jonathan Pryor</name>
	</author>
	<content type="html">&lt;br&gt;On Sun, 2009-10-04 at 15:49 +0800, Wee Li Yen wrote:
&lt;br&gt;&amp;gt; Can someone explain what are these referring to in Mono.Cecil?
&lt;br&gt;&amp;gt; TypeReference,
&lt;br&gt;&lt;br&gt;A reference to a type (which may be present within another assembly).
&lt;br&gt;&lt;br&gt;For example, if you compile the code:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine();
&lt;br&gt;&lt;br&gt;the IL will be:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call void class [mscorlib]System.Console::WriteLine()
&lt;br&gt;&lt;br&gt;which in Mono.Cecil will be a MethodReference to
&lt;br&gt;System.Console.WriteLine(), and MethodReference.DeclaringType will be a
&lt;br&gt;TypeReference to System.Console.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;ExternType, Override,
&lt;br&gt;&lt;br&gt;In this class:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class Demo {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public override string ToString() {return &amp;quot;demo&amp;quot;;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;The virtual method System.Object.ToString() is overridden. &amp;nbsp;All
&lt;br&gt;overridden methods are present within an Overrides table for a type.
&lt;br&gt;&lt;br&gt;&amp;gt; NestedType,
&lt;br&gt;&lt;br&gt;A type declared within another type, e.g.:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class List&amp;lt;T&amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public struct Enumerator {}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;List&amp;lt;T&amp;gt;.Enumerator is a nested type.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;PInvokeInfo,
&lt;br&gt;&lt;br&gt;When you use the [DllImport] attribute on a method.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;SecurityDeclaration
&lt;br&gt;&lt;br&gt;Many System.Security attributes aren't saved as normal custom attributes
&lt;br&gt;in IL, but instead are stored &amp;quot;specially&amp;quot;. &amp;nbsp;Thus, there is a specific
&lt;br&gt;table to store these &amp;quot;attributes&amp;quot;.
&lt;br&gt;&lt;br&gt;(i.e. they only look like custom attributes within C# source, much like
&lt;br&gt;[Serializable], but they're not really custom attributes.)
&lt;br&gt;&lt;br&gt;&amp;gt; and CustomAttribute
&lt;br&gt;&lt;br&gt;Used to store custom attributes:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [AttributeUsage(AttributeTargets.All)]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class FooAttribute : Attribute {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public FooAttribute(string foo) {}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Foo (&amp;quot;this is a custom attribute!&amp;quot;)]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class Bar {}
&lt;br&gt;&lt;br&gt;&amp;gt; and MarshalSpec
&lt;br&gt;&lt;br&gt;Used for custom marshaling. &amp;nbsp;Usually used only for P/Invoke marshaling.
&lt;br&gt;&lt;br&gt;&amp;nbsp;- Jon
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/What-are-the-following-constructs-in-Mono.Cecil-referring-to-in-C---tp25738631p25750636.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25750226</id>
	<title>Re: Difference btn MethodReference and MethodDefinition?</title>
	<published>2009-10-05T05:49:12Z</published>
	<updated>2009-10-05T05:49:12Z</updated>
	<author>
		<name>Jonathan Pryor</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body bgcolor=&quot;#FFFFFF&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); &quot;&gt;On Oct 5, 2009, at 8:11 AM, Wee Li Yen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25750226&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;weeliyen@...&lt;/a&gt;&amp;gt; wrote:&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); &quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;What is the difference btn a MethodReference and 
MethodDefinition?&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: Helvetica; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); font-size: 17px; &quot;&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 35, 163); font-family: Verdana; font-size: 15px;&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;A MethodReference is a reference to a method, which may be defined in another assembly (e.g. a call to Console.WriteLine() from yor app).&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;A MethodDefinition is the actual method itself, thus allowing access to the method's IL, etc.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;- Jon&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;/body&gt;&lt;/html&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Difference-btn-MethodReference-and-MethodDefinition--tp25749655p25750226.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25750192</id>
	<title>Re: What are the following constructs in Mono.Cecil  referring to in C#?</title>
	<published>2009-10-05T05:46:24Z</published>
	<updated>2009-10-05T05:46:24Z</updated>
	<author>
		<name>yeeen</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; I suggest you have a look at the ECMA-335 document. Cecil is basically
&lt;br&gt;&amp;gt; mapping the metadata layout that is decribed is the document into an
&lt;br&gt;&amp;gt; objet model.
&lt;br&gt;&lt;br&gt;Can u tell me more specifically where should I look at? I search for 
&lt;br&gt;&amp;quot;metadata&amp;quot; but still can't find the info I want.
&lt;br&gt;So I choose &amp;quot;PInvokeInfo&amp;quot; and try to search for it. I still can't it in the 
&lt;br&gt;file.
&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------
&lt;br&gt;From: &amp;quot;Jb Evain&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25750192&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Sunday, October 04, 2009 11:25 PM
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25750192&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Subject: [mono-cecil] Re: What are the following constructs in Mono.Cecil 
&lt;br&gt;referring to in C#?
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hey,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 10/4/09, Wee Li Yen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25750192&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;weeliyen@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Can someone explain what are these referring to in Mono.Cecil?
&lt;br&gt;&amp;gt;&amp;gt; TypeReference, ExternType, Override, NestedType, PInvokeInfo,
&lt;br&gt;&amp;gt;&amp;gt; SecurityDeclaration and CustomAttribute and MarshalSpec
&lt;br&gt;&amp;gt;&amp;gt; Best if can illustrate with examples.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I suggest you have a look at the ECMA-335 document. Cecil is basically
&lt;br&gt;&amp;gt; mapping the metadata layout that is decribed is the document into an
&lt;br&gt;&amp;gt; objet model.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What is TerminateModuleDefinition doing in BaseReflectionVisitor? What is
&lt;br&gt;&amp;gt;&amp;gt; the use and how to call it?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The visitor pattern implemented in Cecil is kind of broken. I strongly
&lt;br&gt;&amp;gt; suggest you avoid using it, and implement your own visit mechanism. In
&lt;br&gt;&amp;gt; this particular case, it's just a method called after a module
&lt;br&gt;&amp;gt; definition has been completely visited.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25750192&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/What-are-the-following-constructs-in-Mono.Cecil-referring-to-in-C---tp25738631p25750192.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25749655</id>
	<title>Difference btn MethodReference and MethodDefinition?</title>
	<published>2009-10-05T05:11:16Z</published>
	<updated>2009-10-05T05:11:16Z</updated>
	<author>
		<name>yeeen</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=text/html;charset=iso-8859-1 http-equiv=Content-Type&gt;
&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY style=&quot;PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px&quot; id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop=&quot;true&quot; name=&quot;Compose message area&quot;&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;What is the difference btn a MethodReference and 
MethodDefinition?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;It seems like&amp;nbsp; methods under the same file 
as main or&amp;nbsp;calling the constructors&amp;nbsp;are MethodDefinitions, others are 
MethodReferences?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Thanks!&lt;/FONT&gt;&lt;/DIV&gt;&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Difference-btn-MethodReference-and-MethodDefinition--tp25749655p25749655.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25740227</id>
	<title>Cecil Decompiler -- can i pass in a file from a different solution?</title>
	<published>2009-10-04T10:36:46Z</published>
	<updated>2009-10-04T10:36:46Z</updated>
	<author>
		<name>yeeen</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=text/html;charset=iso-8859-1 http-equiv=Content-Type&gt;
&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY style=&quot;PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px&quot; id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop=&quot;true&quot; name=&quot;Compose message area&quot;&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Regarding Cecil.Decompiler:&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
var method = GetProgramMethod(file, 
name);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var 
cfg = 
ControlFlowGraph.Create(method);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
FormatControlFlowGraph(Console.Out, 
cfg);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var 
language = 
CSharp.GetLanguage(CSharpVersion.V3);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
var writer = language.GetWriter(new 
PlainTextFormatter(Console.Out));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
writer.Write(method);&lt;BR&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Can I call a method from another solution 
instead, replacing the variable &quot;file&quot;?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;I tried putting in the path of the file, but it 
doesn't work...&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Verdana&gt;Thanks!&lt;/FONT&gt;&lt;/DIV&gt;&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
--
 &lt;br&gt; mono-cecil&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cecil-Decompiler----can-i-pass-in-a-file-from-a-different-solution--tp25740227p25740227.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25739964</id>
	<title>Re: What are the following constructs in Mono.Cecil  referring to in C#?</title>
	<published>2009-10-04T10:10:05Z</published>
	<updated>2009-10-04T10:10:05Z</updated>
	<author>
		<name>yeeen</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;But I realised there are a lot of Visitors inside Cecil...
&lt;br&gt;Which do I use if I want to accomplish sth like 
&lt;br&gt;&lt;a href=&quot;http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.cdt.doc.isv/reference/api/org/eclipse/cdt/core/dom/ast/ASTVisitor.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.cdt.doc.isv/reference/api/org/eclipse/cdt/core/dom/ast/ASTVisitor.html&lt;/a&gt;&lt;br&gt;in eclipse?
&lt;br&gt;&lt;br&gt;If really there is no visitor pattern suitable for me...
&lt;br&gt;Would implementing my own visitor without any existing visitor to extend be 
&lt;br&gt;difficult?
&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------
&lt;br&gt;From: &amp;quot;Jb Evain&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25739964&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Sunday, October 04, 2009 11:25 PM
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25739964&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Subject: [mono-cecil] Re: What are the following constructs in Mono.Cecil 
&lt;br&gt;referring to in C#?
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hey,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 10/4/09, Wee Li Yen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25739964&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;weeliyen@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Can someone explain what are these referring to in Mono.Cecil?
&lt;br&gt;&amp;gt;&amp;gt; TypeReference, ExternType, Override, NestedType, PInvokeInfo,
&lt;br&gt;&amp;gt;&amp;gt; SecurityDeclaration and CustomAttribute and MarshalSpec
&lt;br&gt;&amp;gt;&amp;gt; Best if can illustrate with examples.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I suggest you have a look at the ECMA-335 document. Cecil is basically
&lt;br&gt;&amp;gt; mapping the metadata layout that is decribed is the document into an
&lt;br&gt;&amp;gt; objet model.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What is TerminateModuleDefinition doing in BaseReflectionVisitor? What is
&lt;br&gt;&amp;gt;&amp;gt; the use and how to call it?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The visitor pattern implemented in Cecil is kind of broken. I strongly
&lt;br&gt;&amp;gt; suggest you avoid using it, and implement your own visit mechanism. In
&lt;br&gt;&amp;gt; this particular case, it's just a method called after a module
&lt;br&gt;&amp;gt; definition has been completely visited.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25739964&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/What-are-the-following-constructs-in-Mono.Cecil-referring-to-in-C---tp25738631p25739964.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25739900</id>
	<title>Re: System.NotSupportedException due to LoadSymbols();</title>
	<published>2009-10-04T10:02:44Z</published>
	<updated>2009-10-04T10:02:44Z</updated>
	<author>
		<name>yeeen</name>
	</author>
	<content type="html">&lt;br&gt;I found a mono.snk in /gtk-sharp, so I compiled to mcs/class. I think it 
&lt;br&gt;works now, thank you so much!
&lt;br&gt;&lt;br&gt;The thread I found earlier 
&lt;br&gt;(&lt;a href=&quot;http://www.mail-archive.com/mono-cecil@googlegroups.com/msg00943.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.mail-archive.com/mono-cecil@.../msg00943.html&lt;/a&gt;) says 
&lt;br&gt;&amp;quot;You need to either get Mono.Cecil.Pdb from /cecil/pdb in Mono' svn. 
&lt;br&gt;Mono.Cecil.Mdb is in /mcs/class/Mono.Cecil.Mdb, and of course,Mono.Cecil is 
&lt;br&gt;in /mcs/class/Mono.Cecil.&amp;quot;
&lt;br&gt;But Mdb doesn't seem to hv any effect on the variable names?
&lt;br&gt;&lt;br&gt;I still have variables with default names (starting with CS$) assigned, so I 
&lt;br&gt;guess it is cos they are just anonymous variables.
&lt;br&gt;&lt;br&gt;However why does &amp;quot;Console.WriteLine(a + &amp;quot; &amp;quot; + b + &amp;quot; &amp;quot; + c);&amp;quot; gives me an 
&lt;br&gt;additional variable with the name CS$0000?
&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------
&lt;br&gt;From: &amp;quot;Jb Evain&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25739900&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Sunday, October 04, 2009 11:27 PM
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25739900&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-cecil@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Subject: [mono-cecil] Re: System.NotSupportedException due to LoadSymbols();
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hey,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 10/4/09, Wee Li Yen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25739900&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;weeliyen@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; There is no Mono.Cecil.Pdb.dll in /cecil/pdb, I also can't compile the
&lt;br&gt;&amp;gt;&amp;gt; Mono.Cecil.Pdb solution due to &amp;quot;........\Visual Studio
&lt;br&gt;&amp;gt;&amp;gt; 2008\Projects\Mono.CompilerServices.SymbolStore\mcs\class\mono.snk'
&lt;br&gt;&amp;gt;&amp;gt; -- The system cannot find the file specified&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Just change whatever path specified to the .snk to pick the one that
&lt;br&gt;&amp;gt; is in the Mono svn (mcs/class/mono.snk). And make sure you have a
&lt;br&gt;&amp;gt; Mono.Cecil.Pdb.dll near Mono.Cecil.dll when you call LoadSymbols, and
&lt;br&gt;&amp;gt; that the assembly you're reading has a pdb symbol file.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Jb Evain &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25739900&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;--
&lt;br&gt;mono-cecil
&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/System.NotSupportedException-due-to-LoadSymbols%28%29--tp25738635p25739900.html" />
</entry>

</feed>
