Hi,
I have several special methods, and I want analyze they calls in compiled assembly.
Example:
public static class SrcHelper {
[MySpecialMethod]
[Conditional( "DEBUG" )]
public static void ToDo( params object[] info ) {
/* do nothing */
/* this method is not called when code is compiled in RELEASE mode */...
Hello.
I am trying to use Cecil to inspect the attributes associated with a given method. It seems to find it, but I cannot get its name using the following code:
AssemblyDefinition assembly = AssemblyFactory.GetAssembly(pathBin);
assembly.MainModule.Types[0].Methods[1].CustomAttributes[0].ToString()
I know this must be the attribute...
Hello. I am using Cecil to try to read my attributes properties:
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class TraceMethodAttribute : Attribute {
public TraceMethodAttribute() {
MethodStart = true;
MethodReturn = true;
MethodMessages = true;
}
...
Which is the better in terms of capabilities, easy of use, documentation, samples, community/support, VS integration, known implementations, long-term viability, and build speed to implement a custom AOP framework?
I'll start with what I know (I have only tried PostSharp to so far):
Microsoft Common Compiler
Instrastruture (CCI): I've...
I need to determine all assemblies referenced by a certain .NET Compact Framework assembly. Do you think this is possible with Cecil?
This way our deployment tools could automatically resolve all dependencies of our .NET Compact Framework applications.
...
Hi, I am new to Mono Cecil!
Any comprehensive documentations and tutorials on Mono Cecil?
I have seen these articles and video below, so don't give me these links again:
http://www.mono-project.com/Cecil%3AFAQ
http://blog.paul-mason.co.nz/2009/08/protecting-your-precious-code-monocecil.html
http://www.dimecasts.net/Casts/CastDetails...
Can someone explain what are these referring to?
MemberReference, TypeReference, ExternType, Override, NestedType, PInvokeInfo, SecurityDeclaration and CustomAttribute and MarshalSpec
Best if can illustrate with examples. Will appreciate even if u don't know all, but still help me in understanding those u know.
Cos I am trying to write ...
I am currently using Mono Cecil to extract data from C# projects. Now I need to check whether a field is read or written to in each method.
How can tell from the CIL instruction that a field is being read or written to?
Cos I doubt there a library in Mono Cecil similar to Assignment in Eclipse's JDT that allows me to extract the left h...
I am using Lokad shared libraries, which in turn depends on Mono.Cecil.
I am a little confused what the following properties mean (they are to do with .NET internals and thus have equivalent .NET internals):
PackingSize (they are to do with types as it is in TypeDefinition).
Mvid (in ModuleDefinition).
ExplicitThis (something to do wi...
Hello guys,
Is there anything similar to Reflection.Emit.DynamicMethod in Cecil? Thanks.
DynamicMethod
Edit:
What about for the following things?
EmitCall (e.g.
IL.EmitCall(OpCodes.Callvirt, GetBuildKey, null);
IL.Emit(OpCodes.Unbox_Any, dependencyType);
)
LocalBuilder (e.g. LocalBuilder resolving = ilContext.IL.DeclareLoc...
Hi,
(First of all, this is a very lengthy post, but don't worry: I've already implemented all of it, I'm just asking your opinion, or possible alternatives.)
I'm having trouble implementing the following; I'd appreciate some help:
I get a Type as parameter.
I define a subclass using reflection. Notice that I don't intend to modify th...
I'm using Mono.Cecil (version 0.6.9.0) to alias a method that implements an interface method. To do that, I have to add an Override to the target method that points back to the interface method (much like what's possible with VB.NET), like this:
using System;
using System.Reflection;
using Mono.Cecil;
class Program {
static void Mai...