reflector

How do you find all implementations of an interface?

不羁岁月 提交于 2019-11-26 18:47:56
Suppose you have an interface defined in C#. What is the easiest method to find all classes that provide an implementation of the interface? The brute force method would be to use "Find References" in Visual Studio and manually look through the results to separate out the usages from the implementations, but for an interface in a large codebase that is heavily referenced with relatively few implementations, this can be time consuming and error prone. In Java, running javadoc on the codebase (using the -private option to include private classes) would generate a documentation page for the

Something Better than .NET Reflector? [closed]

浪尽此生 提交于 2019-11-26 16:46:24
I used to love Reflector back in the day, but ever since RedGate took over it has gone downhill dramatically. Now it forces me to update (which is absolutely ridiculous), half the time the update doesn't go smoothly, and it is increasingly hindering my productivity with each update. I am sick of it, and I am ready for something better. Does anybody know of a better disassembler? Update: List of various alternatives mentioned in answers - ILSpy dotPeek JustDecompile DisSharper Mono Cecil Kaliro Dotnet IL Editor (DILE) Common Compiler Infrastructure Also take a look at ILSpy by SharpDevelop . It

How do you find all implementations of an interface?

旧街凉风 提交于 2019-11-26 06:36:58
问题 Suppose you have an interface defined in C#. What is the easiest method to find all classes that provide an implementation of the interface? The brute force method would be to use \"Find References\" in Visual Studio and manually look through the results to separate out the usages from the implementations, but for an interface in a large codebase that is heavily referenced with relatively few implementations, this can be time consuming and error prone. In Java, running javadoc on the codebase

Why check this != null?

别来无恙 提交于 2019-11-26 06:31:39
问题 Occasionally I like to spend some time looking at the .NET code just to see how things are implemented behind the scenes. I stumbled upon this gem while looking at the String.Equals method via Reflector. C# [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] public override bool Equals(object obj) { string strB = obj as string; if ((strB == null) && (this != null)) { return false; } return EqualsHelper(this, strB); } IL .method public hidebysig virtual instance bool Equals

Something better than .NET Reflector? [closed]

↘锁芯ラ 提交于 2019-11-26 04:57:16
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I used to love .NET Reflector back in the day, but ever since Red Gate Software took over it has gone downhill dramatically. Now it

C# reflection and finding all references

点点圈 提交于 2019-11-26 04:41:37
问题 Given a DLL file, I\'d like to be able to find all the calls to a method within that DLL file. How can I do this? Essentially, how can I do programmatically what Visual Studio already does? I don\'t want to use a tool like .NET Reflector to do this, but reflection is fine and probably necessary. 回答1: To find out where a method MyClass.Foo() is used, you have to analyse all classes of all assemblies that have a reference to the assembly that contains MyClass . I wrote a simple proof of concept

Open Source Alternatives to Reflector? [closed]

五迷三道 提交于 2019-11-26 00:49:36
问题 Just to ask if anyone knows of an open source alternative to RedGate\'s Reflector? I\'m interested in checking out how a tool similar to Reflector actually works. Note, if you know of a free but not open source alternative to Reflector, you can answer the following related question: Something Better than .NET Reflector? Summary - Updated 11th May 2011 A quick round-up of the various open source projects and tools that have been suggested: Common Compiler Infrastructure (CCI) Mono Cecil ILSpy

How can I protect my .NET assemblies from decompilation?

旧城冷巷雨未停 提交于 2019-11-26 00:47:14
问题 One if the first things I learned when I started with C# was the most important one. You can decompile any .NET assembly with Reflector or other tools. Many developers are not aware of this fact and most of them are shocked when I show them their source code. Protection against decompilation is still a difficult task. I am still looking for a fast, easy and secure way to do it. I don\'t want to obfuscate my code so my method names will be a,b,c or so. Reflector or other tools should be unable