Invoking method having attribute passed specific string data without reflection

207 views Asked by At

I need to call method having a specific attribute passed some string data. For the setup below, how can you call(invoke) method having attribute parameter of "Call this method" without using reflection ? By the way I use ninject as IoC.

public interface ISomeInterface
{
    int Method1();
    int Method2();
}

public class SomeClass: ISomeInterface
{
    [SomeAttribute("Do not call this method")]
    public int Method1(){
       return 1;
    };

    [SomeAttribute("Call this method")]
    public int Method2(){
       return 2;
    };
}   
0

There are 0 answers