Tagged Questions
2
votes
0answers
171 views
How to check type forwarding for type in mscorlib to system.runtime?
I'm analysing code at runtime and the IObservable appears to be coming from the System.Runtime assembly when running in a .Net 4.5 application.
Now I know IObservable is defined in mscorlib (system ...
2
votes
0answers
87 views
Control when referenced .NET assemblies are loaded
Normally a referenced assembly of an assembly is loaded when the first method from a type in the referenced assembly is executed.
Does it make sense to force loading all referenced assemblies at a ...
2
votes
0answers
89 views
Getting Non-Constant Constructor Arguments from Expression Selector
I have a method that looks something like this:
public static T GenerateProxy<T>(params object[] ctorArgs)
{
return proxyGenerator.CreateProxy(typeof(T), ctorArgs);
}
Basically, it's ...
2
votes
0answers
168 views
Load WPF application from the memory
So this is how you invoke Main() in non WPF applications:
var entry = assembly.EntryPoint;
if (assembly.EntryPoint.GetParameters().Length == 0)
entry.Invoke(null, new object[0]);
else
...
2
votes
0answers
153 views
How to generate delegate type from method reference?
I'm trying to generate delegate type from MethodReference, but PEVerify keeps saying my type isn't valid.
Here's my code:
TypeDefinition CreateDelegates(TypeDefinition type, MethodReference ...
2
votes
0answers
80 views
Run private strong-named assemblies side-by-side
I have an application depending on version 1.0 of Assembly A (which is strongly named and deployed privately in bin folder). The application also loads Assembly B via reflection. The complication is ...
1
vote
0answers
56 views
What is a good unique identifying property of a .NET Method Info
When storing Method Info data, from a Reflection read of a set of .NET assemblies, what would be the best logical key to use from the Method Info instance, to separate it from like name Methods in ...
1
vote
0answers
56 views
Temp AppDomain and File Locking
I have successfully created a class that inherits from MarshallByRefObject.
The above class also implements an interface and is invoked remotely from the main AppDomain. DTOs were also created to ...
1
vote
0answers
85 views
Is there an example of memory IL rewriting (Profiler API)?
I saw that the profiler API can do that. Do anyone know an example except this: http://www.codeproject.com/Articles/17275/Really-Easy-Logging-using-IL-Rewriting-and-the-NET Cause I can't even compile ...
1
vote
0answers
79 views
Do .NET Assemblies Cache References To Other Assemblies?
This might sound like an odd question (I've, at least, never had reason to think about it until now), but let me explain my situation.
We have a service app that runs on servers on our client's ...
1
vote
0answers
131 views
MethodInfo.Invoke Works only in Debug Mode for Prism EventAggregator
I have a extension method for Prism's EventAgregator to publish an event using reflection. The implementation is as follows:
MethodInfo raiseMethod = typeof(Extensions).GetMethod("Raise", ...
1
vote
0answers
287 views
AssemblyBuilder reference assembly
I am creating a new Assembly using System.Reflection.Emit.
I want the new assembly to reference another assembly. There is a method GetReferencedAssemblies() that gets all the referenced assemblies, ...
1
vote
0answers
175 views
class name using reflection in a VS2010 macro
I have a VS2010 macro that inserts bolierplate header text at top of each class. Running the macro inserts module name, developer, description, etc. as expected.
Instead of typing the module name, i ...
1
vote
0answers
186 views
How to create an interactive .net demo application
In an upcoming exhibition, I would like to have a splash screen with 5 buttons, each stating the key benefits of our .net application.
Once the user click on a button, I would like our .net ...
1
vote
0answers
163 views
Getting System::Type from IronRuby class
I have an IronRuby script like this one:
class MyClassA < NamespaceMaze::BaseClass
description = "I'm MyClassA"
# <snip> some methods
end
class HelperClass; end
class MyClassC < ...