<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>reflectoraddins Forum Rss Feed</title><link>http://www.codeplex.com/reflectoraddins/Thread/List.aspx</link><description>reflectoraddins Forum Rss Description</description><item><title>New Post: Problem in Extracting BizTalk 2006 dll's</title><link>http://reflectoraddins.codeplex.com/discussions/442202</link><description>&lt;div style="line-height: normal;"&gt;I am migrating my application from 2006 R2 version to 2010 version. I do not have the source code for the application and hence used the 2006 production dll. I am using .Net Reflector Tool 8.0 with BizTalkDisassembler add-in.&lt;br /&gt;
 &lt;br /&gt;
After extraction, I am able to view few Schemas and Pipelines after changing the xml version. For some files am getting error &amp;quot;Value cannot be null - parameter name : path2&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
Am not able to view Maps and Orchestrations. While trying to open .odx files, am getting the error &amp;quot;File is not in the proper .odx format and cannot be opened in the Orchestration Designer&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
Has anyone else faced the same issues.&lt;br /&gt;
 &lt;br /&gt;
Can someone please provide any suggestions.&lt;br /&gt;
 &lt;br /&gt;
Also let me know, any alternative tool to extract BizTalk dll's?&lt;br /&gt;
&lt;/div&gt;</description><author>mvenkatmca</author><pubDate>Wed, 01 May 2013 10:46:45 GMT</pubDate><guid isPermaLink="false">New Post: Problem in Extracting BizTalk 2006 dll's 20130501104645A</guid></item><item><title>New Post: Can we expect .NET reflector from Microsoft/Codeplex?</title><link>http://reflectoraddins.codeplex.com/discussions/275166</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;thanks for making a reflector - Assembly Analyzer - &lt;a href="http://asmanalyzer.codeplex.com/"&gt;http://asmanalyzer.codeplex.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Are AddIns updated to Assembly Analyzer?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>kphani_prasad</author><pubDate>Sat, 08 Oct 2011 01:46:50 GMT</pubDate><guid isPermaLink="false">New Post: Can we expect .NET reflector from Microsoft/Codeplex? 20111008014650A</guid></item><item><title>New Post: Can we expect .NET reflector from Microsoft/Codeplex?</title><link>http://reflectoraddins.codeplex.com/discussions/275166</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Can we expect .NET reflector from Microsoft/Codeplex?&lt;/p&gt;
&lt;p&gt;Its devastating to developer community&amp;nbsp;that .net reflector from red-gate is made purchase, except for trial period...&lt;/p&gt;
&lt;p&gt;Can Microsoft stop adding AddIns to it and stand on their own Reflector tool - freely downloadable from Microsoft site,&lt;/p&gt;
&lt;p&gt;Hoping CodePlex team would wake up soon on this....!!&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>kphani_prasad</author><pubDate>Sat, 08 Oct 2011 01:31:57 GMT</pubDate><guid isPermaLink="false">New Post: Can we expect .NET reflector from Microsoft/Codeplex? 20111008013157A</guid></item><item><title>New Post: Analyzer....</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=236918</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Is there are way to access the &amp;quot;Instantiated by&amp;quot; output when writing an add-in?&lt;/p&gt;
&lt;/div&gt;</description><author>nbortolotti</author><pubDate>Thu, 02 Dec 2010 20:22:05 GMT</pubDate><guid isPermaLink="false">New Post: Analyzer.... 20101202082205P</guid></item><item><title>New Post: Using Reflector from the command line during Continuous Integration</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=234645</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I'm trying to use Reflector to generate Code Complexity metrics (using the CodeMetrics addin) as part of my continuous integration build (Hudson).&lt;/p&gt;
&lt;p&gt;I have Reflector checked into my repo, along with the CodeMetric addin.&lt;/p&gt;
&lt;p&gt;However, when the CI process tries to run reflector from the command line, ala:&lt;/p&gt;
&lt;pre&gt;&lt;span style="font-family:'Segoe UI','Microsoft Sans Serif',Arial,Geneva,sans-serif; white-space:normal"&gt;&lt;pre&gt;CalculateComplexityMetrics:
  &amp;quot;C:\Websites\hudson\jobs\RTD-Subscription-Engine\workspace\src\..\tools\reflector\Reflector.exe&amp;quot; /Run:Reflector.CodeMetrics /Assembly:&amp;quot;C:\Websites\hudson\jobs\RTD-Subscription-Engine\workspace\src\..\src\SubscriptionEngine.Core\bin\Debug\SubscriptionEngine.Core.dll&amp;quot; /OutputPath:&amp;quot;CodeMetrics.xml&amp;quot;&lt;/pre&gt;
it just hangs.&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;I suspect that the add-in has to be manually &amp;quot;added&amp;quot; from a GUI before running from the command line.&lt;/p&gt;
&lt;p&gt;Is there a way to register the addin from the command line? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternately, where is reflector storing which addins are active? &amp;nbsp;Perhaps I could just poke in some registry settings before running the command line?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;
&lt;/div&gt;</description><author>mrdavidlaing</author><pubDate>Sun, 14 Nov 2010 14:37:42 GMT</pubDate><guid isPermaLink="false">New Post: Using Reflector from the command line during Continuous Integration 20101114023742P</guid></item><item><title>New Post: Add PowerCommands for Reflector</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=228785</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Just wanted to request that &amp;quot;PowerCommands for Reflector&amp;quot; get added to the homepage.&lt;/p&gt;
&lt;p&gt;&lt;a title="http://powercommands.codeplex.com/" href="http://powercommands.codeplex.com/"&gt;http://powercommands.codeplex.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This tool is pretty awesome.&amp;nbsp; In particular, I liked the ability to grab .resx files.&amp;nbsp; Not necessary, but handy.&lt;/p&gt;&lt;/div&gt;</description><author>samuelms</author><pubDate>Mon, 27 Sep 2010 23:08:43 GMT</pubDate><guid isPermaLink="false">New Post: Add PowerCommands for Reflector 20100927110843P</guid></item><item><title>New Post: unable to resolve assembly reference</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=218279</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;While trying to disassemble an exe file, I got an error message i.e. unable to resolve assembly reference.&lt;/p&gt;
&lt;p&gt;Can anybody suggest is there any kind of protection being used while creating an exe and how to disassemble such exe files..&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;ami&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>amigupta</author><pubDate>Sun, 04 Jul 2010 09:43:24 GMT</pubDate><guid isPermaLink="false">New Post: unable to resolve assembly reference 20100704094324A</guid></item><item><title>New Post: Baml file format specification</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=212956</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I'm interested in many low-level aspects of the .NET framework but can't seem to find any information about the BAML file format anywhere. The BAMLViewer contains a class for parsing these files, which theoretically could be used to determine the file format, but does anyone know if/where the file specification can be found to avoid having to take the hard route?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br&gt;Ben&lt;/p&gt;&lt;/div&gt;</description><author>BenRoberts</author><pubDate>Mon, 17 May 2010 23:09:15 GMT</pubDate><guid isPermaLink="false">New Post: Baml file format specification 20100517110915P</guid></item><item><title>New Post: request reflector</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=212829</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;i request&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;brose from object browser&lt;/li&gt;
&lt;li&gt;create visual studio solution and project from assembly&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;i difficult english.sorry.&lt;/p&gt;&lt;/div&gt;</description><author>kazuhiro_xenosaga</author><pubDate>Mon, 17 May 2010 02:52:44 GMT</pubDate><guid isPermaLink="false">New Post: request reflector 20100517025244A</guid></item><item><title>New Post: AutoDiagrammer Link is broken</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=209541</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;This is the new url : &lt;a href="http://www.codeproject.com/KB/cs/AutoDiagrammer.aspx"&gt;http://www.codeproject.com/KB/cs/AutoDiagrammer.aspx&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><author>laedit</author><pubDate>Fri, 16 Apr 2010 08:03:35 GMT</pubDate><guid isPermaLink="false">New Post: AutoDiagrammer Link is broken 20100416080335A</guid></item><item><title>New Post: Autodiagrammer failed to load with latest reflector</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=199349</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The latest autodiagramer.dll (v1.12.0.0) seems not work with the latest reflector (v5.1.6.0)&lt;/p&gt;
&lt;p&gt;There is a BadImageFormatException after trying to add it&lt;/p&gt;
&lt;p&gt;Das someone any idea ? Thanks in advance&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>Sarkor</author><pubDate>Fri, 26 Feb 2010 10:08:23 GMT</pubDate><guid isPermaLink="false">New Post: Autodiagrammer failed to load with latest reflector 20100226100823A</guid></item><item><title>New Post: What version(s) of Silverlight does SilverlightLoader support?</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=81165</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;What version(s) of Silverlight does SilverlightLoader support? &amp;nbsp;I've installed it but I'm having trouble seeing my Silverlight 3.0 application.&lt;/p&gt;&lt;/div&gt;</description><author>ssg31415926</author><pubDate>Mon, 18 Jan 2010 11:49:41 GMT</pubDate><guid isPermaLink="false">New Post: What version(s) of Silverlight does SilverlightLoader support? 20100118114941A</guid></item><item><title>New Post: Obtain a IMethodReference from IInstruction.Value</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=76149</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I have a simple bit of code (mostly from Jason Haley's &lt;a href="http://jasonhaley.com/blog/post/2007/10/26/Ways-to-use-Net-Reflector-3-Wrap-it.aspx"&gt;article&lt;/a&gt;) that wraps Reflector.exe. I am trying to get the information found in Analysis' pane's &amp;quot;Used By&amp;quot; and &amp;quot;Instantiated By&amp;quot; items. In abbreviated form (no&amp;nbsp;curly braces, etc)&amp;nbsp;the code goes like this:&lt;/p&gt;
&lt;div style="color:Black;background-color:White"&gt;
&lt;pre&gt;&lt;span style="color:Blue"&gt;foreach&lt;/span&gt; (IModule module &lt;span style="color:Blue"&gt;in&lt;/span&gt; assembly.Modules)
    &lt;span style="color:Blue"&gt;foreach&lt;/span&gt; (ITypeDeclaration typeDeclaration &lt;span style="color:Blue"&gt;in&lt;/span&gt; module.Types)
       &lt;span style="color:Blue"&gt;foreach&lt;/span&gt; (IMethodDeclaration methodDeclaration &lt;span style="color:Blue"&gt;in&lt;/span&gt; typeDeclaration.Methods)
          IMethodBody methodBody = methodDeclaration.Body &lt;span style="color:Blue"&gt;as&lt;/span&gt; IMethodBody;
          &lt;span style="color:Blue"&gt;foreach&lt;/span&gt; (IInstruction instruction &lt;span style="color:Blue"&gt;in&lt;/span&gt; methodBody.Instructions)
         &lt;span style="color:Green"&gt;/* appropriate code to find call, calli, callvirt, and newobj
            statements  and for them obtain instruction.value*/&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;All of this works as expected. The problem arises from the fact that&amp;nbsp; the Target of the statements is not a fully qualified name as illustrated:&lt;/p&gt;
&lt;pre&gt;     Call to : String.get_Length() : Int32
     Call to : String.Trim() : String
     Instance: StringBuilder..ctor() : Void
     Call to : StringLogicalComparer.CompareNumbers(String, String, Int32, Int32&amp;amp;) : Int32
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Obviously I need the fully qualified names to filter out calls to the .Net libraries and to distinguish between my own Namespaces, etc.&lt;/p&gt;
&lt;p&gt;What I seem to need is a way to obtain the appropriate IMethodReference from Reflector for the Target of the calls and newobj statements.&lt;/p&gt;
&lt;p&gt;Is there any hope of getting what I need? It is very frustrating to be so close yet so far away.&lt;/p&gt;
&lt;p&gt;Thanks for any help you can give me.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jim Parsells&lt;/p&gt;&lt;/div&gt;</description><author>parsellj</author><pubDate>Wed, 25 Nov 2009 05:03:42 GMT</pubDate><guid isPermaLink="false">New Post: Obtain a IMethodReference from IInstruction.Value 20091125050342A</guid></item><item><title>New Post: Help!! please (The following add-in(s) failed to load )</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=74539</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I am new to dot net,&lt;/p&gt;
&lt;p&gt;I want to debug my application,&lt;/p&gt;
&lt;p&gt;I heard Reflector is a good decompiler for dot net,&lt;/p&gt;
&lt;p&gt;Its good it shows me the code but i want to edit the code, if i try to add any plugin like &amp;quot;ICSharpCode.TextEditor.dll&amp;quot;&lt;/p&gt;
&lt;p&gt;I get the Failed to load error,&lt;/p&gt;
&lt;p&gt;I have uploaded a screen shot please check&lt;/p&gt;
&lt;p&gt;http://i37.tinypic.com/2zdou9i.jpg&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please help me,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;HarshaGowda&lt;/p&gt;&lt;/div&gt;</description><author>harshagowda</author><pubDate>Mon, 09 Nov 2009 14:19:40 GMT</pubDate><guid isPermaLink="false">New Post: Help!! please (The following add-in(s) failed to load ) 20091109021940P</guid></item><item><title>New Post: Add-ins to include</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=71884</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;There's a couple of add-ins not listed there (see below).&lt;br&gt;Also, what about all-in-one release (maybe with reflector.cfg, but without reflector binaries)?&lt;/p&gt;
&lt;p&gt;Missing add-ins list:&lt;/p&gt;
&lt;p&gt;AssemblyCollection.Order:&lt;br&gt;http://jasonhaley.com/addins/&lt;br&gt;AssemblyCollection Sort is a simple addin that sorts (or reorders) the assembly listing in Reflector to be in alphabetical order.&lt;br&gt;&lt;br&gt;EnumAddin:&lt;br&gt;http://jasonhaley.com/addins/&lt;br&gt;Enums Addin provides a Bit Flag Converter for helping to determine which bits are turned on by providing an integer or vice versa. This addin also includes an Enum Viewer that is a custom enum disassembler (for VB and C# only) that allows the user to decide whether enum fields should be shown in alphabetical order or by value.&lt;br&gt;&lt;br&gt;Tcdev.DsmPlugin:&lt;br&gt;http://tcdev.free.fr/&lt;br&gt;Dependency Structure Matrix PlugIn for .NET Reflector.&lt;br&gt;&lt;br&gt;ExceptionFinder:&lt;br&gt;http://www.codeplex.com/ExFinderReflector&lt;br&gt;This is a Reflector add-in that will find all of the exceptions that might be thrown by a method.&lt;br&gt;&lt;br&gt;Reflector.Snippy:&lt;br&gt;http://jasonhaley.com/blog/post/2008/11/23/ReflectorSnippy-Addin.aspx&lt;br&gt;Snippy is a light weight snippet compiler.&lt;br&gt;&lt;br&gt;Reflector.Graph (refined):&lt;br&gt;http://www.codeproject.com/KB/cs/method_deps_p1.aspx&lt;br&gt;Diagrams with Reflector and the Graph Plugin (Part 1)&lt;br&gt;Also see refractor (https://sourceforge.net/projects/refractor/)&lt;br&gt;&lt;br&gt;xmi4dotnet:&lt;br&gt;http://mercury.it.swin.edu.au/swinbrain/index.php?title=Xmi4dotnet&lt;br&gt;Use Xmi4DotNet to export your model into a UML package to simplify drawing.&lt;br&gt;&lt;br&gt;CodeShortcut:&lt;br&gt;http://jasonhaley.com/addins/&lt;br&gt;CodeShortcut addin provides a 'Create Shortcut' context menu item for creating a code:// shortcut on your desktop to the item you currently have selected.&lt;br&gt;&lt;br&gt;Reflector.CodeDom:&lt;br&gt;http://www.simple-talk.com/dotnet/.net-framework/-.net-reflector-meets-the-codedom/&lt;br&gt;Plug-in that produces the CodeDom code needed to create the contents of the assembly.&lt;br&gt;&lt;br&gt;Reflector.VulcanLanguage:&lt;br&gt;http://www.fabtoys.net/index.php?option=com_docman&amp;amp;task=cat_view&amp;amp;gid=26&amp;amp;Itemid=33&lt;br&gt;Reflector's add-in to support Vulcan language.&lt;br&gt;&lt;br&gt;Reflector.PowerCommands:&lt;br&gt;http://powercommands.codeplex.com/&lt;/p&gt;&lt;/div&gt;</description><author>sinix</author><pubDate>Wed, 14 Oct 2009 01:15:36 GMT</pubDate><guid isPermaLink="false">New Post: Add-ins to include 20091014011536A</guid></item><item><title>New Post: Does BizTalkDisassembler works with current version of Reflector?</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=65155</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;As discussion name is, does BizTalkDisassembler works with current version (5.1.5.0) of Reflector?&lt;/p&gt;
&lt;p&gt;Because i have some problems extracting BizTalk artifacts, can't find button &lt;span id="ctl00_ctl00_MasterContent_Content_wikiSourceLabel"&gt;&amp;quot;Disassemble...&lt;/span&gt;&amp;quot;. Reflector's &amp;quot;Export...&amp;quot; button doesn't help, only extracts C# (or what you choose from standard list) code.&lt;/p&gt;
&lt;p&gt;I tried extract schemas from BizTalk 2006 assembly.&lt;/p&gt;&lt;/div&gt;</description><author>mclean</author><pubDate>Tue, 11 Aug 2009 06:58:16 GMT</pubDate><guid isPermaLink="false">New Post: Does BizTalkDisassembler works with current version of Reflector? 20090811065816A</guid></item><item><title>New Post: How can I find the type of the object which calls a method (which is generally not the same type than the IMemberReference.DeclaringType)?</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=63184</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I'm not 100% sure I understand what you are looking for, but maybe this will help.&lt;/p&gt;
&lt;p&gt;You metion... &amp;quot;when I put my mouse over the &amp;rdquo;e&amp;ldquo; local variable I can see &amp;ldquo;Employee e // Local Variable&amp;rdquo;. But I cannot retrieve this information.&amp;quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I'm guessing you want to create some smart mapping that 'knows' that SimpleExample.Company.Working() uses an instance of Employee not just any child of Person. If that is what you are trying to do, then you picked a nice challenge for yourself.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can see why Reflector does what it does if you look at the IL version of your SimpleExample.Company.Working().&amp;nbsp;&amp;nbsp; The call to Work() is a callvirt of the Person.Work() ... it isn't simple a call to Employee.Work() like the C# makes it look like.&amp;nbsp; So my guess is you're going to need to parse the IL and decipher the callvirt instructions in a smarter way&amp;nbsp;to determine a better type mapping.&amp;nbsp; Its doable ... but I think you're going to need to get real familiar with IL and how it works (but maybe not).&amp;nbsp; The most beneficial thing in the line: e.Work(); maybe that the variable type of e is Employee.&lt;/p&gt;
&lt;p&gt;You might be able to use the LanguageWriterHelper to help you determine what the C# is showing, for example the e.Work() is a IMethodInvokeExpression, that has a Method and a Target.&amp;nbsp; The Target is an IVariableReferenceExpression ... that has a VariableType of an ITypeReference of SimpleExample.Employee.&lt;/p&gt;
&lt;p&gt;Information on the LanguageWriterHelper:&amp;nbsp; &lt;a href="http://jasonhaley.com/blog/post/2008/12/02/Reflector-Addin-LanguageWriterHelper.aspx"&gt;http://jasonhaley.com/blog/post/2008/12/02/Reflector-Addin-LanguageWriterHelper.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;&lt;/div&gt;</description><author>jasonhaley</author><pubDate>Fri, 07 Aug 2009 01:11:58 GMT</pubDate><guid isPermaLink="false">New Post: How can I find the type of the object which calls a method (which is generally not the same type than the IMemberReference.DeclaringType)? 20090807011158A</guid></item><item><title>New Post: How to add the codemetrics addin to VS?</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=62961</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;It's not a VS addin, but a Reflector addin.&amp;nbsp; Does that answer your question?&lt;/p&gt;&lt;/div&gt;</description><author>rp</author><pubDate>Thu, 30 Jul 2009 07:58:54 GMT</pubDate><guid isPermaLink="false">New Post: How to add the codemetrics addin to VS? 20090730075854A</guid></item><item><title>New Post: How can I find the type of the object which calls a method (which is generally not the same type than the IMemberReference.DeclaringType)?</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=63184</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am actually working on a reflector add-in. This add-in is a smart analyzer which can be configured to find some relationships between methods. That is quite the same that the .NET Reflector analyze does but the main improvement compared to the current static analyzers is:&lt;/p&gt;
&lt;p&gt;Consider the simple following example:&lt;/p&gt;
&lt;p&gt;
&lt;div style="color:Black;background-color:White"&gt;
&lt;pre&gt;&lt;span style="color:Blue"&gt;namespace&lt;/span&gt; SimpleExemple
{
    &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;class&lt;/span&gt;&lt;span style="color:MediumTurquoise"&gt; Company
    &lt;/span&gt;{
        &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Working()
        {
            Employee e = &lt;span style="color:Blue"&gt;new&lt;/span&gt; Employee();
            e.Go();
            e.Work();
            e.Leave();
        }
    }

    &lt;span style="color:Blue"&gt;abstract&lt;/span&gt; &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;class&lt;/span&gt;&lt;span style="color:MediumTurquoise"&gt; Person
    &lt;/span&gt;{
        &lt;span style="color:Blue"&gt;abstract&lt;/span&gt; &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Go();

        &lt;span style="color:Blue"&gt;abstract&lt;/span&gt; &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Work();

        &lt;span style="color:Blue"&gt;abstract&lt;/span&gt; &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Leave();
    }

     &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;class&lt;/span&gt;&lt;span style="color:MediumTurquoise"&gt; Employee:Person
    &lt;/span&gt;{

        &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;override&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Go()
        {
            &lt;span style="color:Green"&gt;// Go to the company&lt;/span&gt;
        }

        &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;override&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Work()
        {
            &lt;span style="color:Green"&gt;// Do some work&lt;/span&gt;
        }

        &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;override&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Leave()
        {
            &lt;span style="color:Green"&gt;// Go back home&lt;/span&gt;
        }
    }

    &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;class&lt;/span&gt;&lt;span style="color:MediumTurquoise"&gt; Manager:Person
    &lt;/span&gt;{

        &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;override&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Go()
        {
            &lt;span style="color:Green"&gt;// Go to the company by car (big one)&lt;/span&gt;
        }

        &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;override&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Work()
        {
            &lt;span style="color:Green"&gt;// Do some manager work&lt;/span&gt;
        }

        &lt;span style="color:Blue"&gt;public&lt;/span&gt; &lt;span style="color:Blue"&gt;override&lt;/span&gt; &lt;span style="color:Blue"&gt;void&lt;/span&gt; Leave()
        {
            &lt;span style="color:Green"&gt;// Go back home by car (big one)&lt;/span&gt;
        }
    }

}
&lt;/pre&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;A Manager is a Person and an Employee is a Person too.&lt;/p&gt;
&lt;p&gt;A Person can Goes (to the company) Works (in the company) and Leaves (the company).&lt;/p&gt;
&lt;p&gt;The company &amp;ldquo;Working&amp;rdquo; method creates a new Employee then the employee Goes, Works and Leaves.&lt;/p&gt;
&lt;p&gt;In this example a Manager never works (the function Manager.Works() is never called, it is just an example I have nothing against the managers ;) ).&lt;/p&gt;
&lt;p&gt;Let us analyze the Manager.Work() method in .NET Reflector:&lt;/p&gt;
&lt;p&gt;SimpleExample.Manager.Work() : Void&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Depends On&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used By&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SimpleExample.Company.Working() : Void&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Actually, the Manager.Work() method is not called in the Company.Working() method. But the Manager.Work() overrides the base method Person.Work() and it is this method which is referenced in the code. This is the principle of virtual (or abstract) methods; the right method call is determinate on runtime.&lt;/p&gt;
&lt;p&gt;I want to circumvent that problem finding the strong typed object type which actually calls the Work() method. If I find the Employee type, I will know that is the Employee.Work() which is called.&lt;/p&gt;
&lt;p&gt;So that is my question: How can I find the type of the object which calls a method (which is generally not the same type than the IMemberReference.DeclaringType)?&lt;/p&gt;
&lt;p&gt;The disassembler in .NET Reflector gives me the information if I disassemble the Company.Working() method: when I put my mouse over the &amp;rdquo;e&amp;ldquo; local variable I can see &amp;ldquo;Employee e // Local Variable&amp;rdquo;. But I cannot retrieve this information.&lt;/p&gt;
&lt;p&gt;Do you know how can I find it? Thanks.&lt;/p&gt;&lt;/div&gt;</description><author>Nigo</author><pubDate>Wed, 22 Jul 2009 11:03:58 GMT</pubDate><guid isPermaLink="false">New Post: How can I find the type of the object which calls a method (which is generally not the same type than the IMemberReference.DeclaringType)? 20090722110358A</guid></item><item><title>New Post: How to add the codemetrics addin to VS?</title><link>http://reflectoraddins.codeplex.com/Thread/View.aspx?ThreadId=62961</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Someone please specify how to&amp;nbsp;add the&amp;nbsp;codemetrics addin to VS...&lt;/p&gt;&lt;/div&gt;</description><author>c_v_nag</author><pubDate>Mon, 20 Jul 2009 13:48:23 GMT</pubDate><guid isPermaLink="false">New Post: How to add the codemetrics addin to VS? 20090720014823P</guid></item></channel></rss>