You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have reflection code that lets me scan/load any assembly that has methods that meet a given signature and create proxies to those methods. It doesn't rely on any defined interface or attributes on the methods. I'm pretty sure I can achieve the same thing with MEF 1.0 and attributes, but ConventionBuilder in MEF 2.0 isn't documented well enough to determine if I can achieve the same thing without attributes.
So my question is, can this be (easily) achieved with LightInject? If so, can someone provide a simple example.
The text was updated successfully, but these errors were encountered:
Say each one of these is defined in a separate assembly:
public static class StaticThing
{
public static Task<bool> MyStaticMethod() =>
Task.FromResult(true);
}
public class InstanceThing
{
public Task<bool> MyInstanceMethod() =>
Task.FromResult(true);
}
public class InstanceWithStaticThing
{
public static Task<bool> MyStaticMethod() =>
Task.FromResult(true);
}
I want to be able to discover and proxy said methods from their assemblies in a given path based on method signature match, which in this case is something like Func<Task<bool>>.
I have reflection code that lets me scan/load any assembly that has methods that meet a given signature and create proxies to those methods. It doesn't rely on any defined interface or attributes on the methods. I'm pretty sure I can achieve the same thing with MEF 1.0 and attributes, but ConventionBuilder in MEF 2.0 isn't documented well enough to determine if I can achieve the same thing without attributes.
So my question is, can this be (easily) achieved with LightInject? If so, can someone provide a simple example.
The text was updated successfully, but these errors were encountered: