public static int Main(String[] args) { int ret = 0; Console.WriteLine("CLR Remoting Sample: Custom Proxy"); Type[] types = new Type[2]; types[0] = typeof(IFaq); types[1] = typeof(IBaz); Console.WriteLine("Generate a new MyProxy using the Type"); MyProxy myProxy = new MyProxy(typeof(MarshalByRefObject), types); Console.WriteLine("Obtain the transparent proxy from myProxy"); MarshalByRefObject mbr = (MarshalByRefObject)myProxy.GetTransparentProxy(); IFaq faq = (IFaq)mbr; int r = faq.MethodX(5, "hi"); Console.WriteLine("{0}", r); IBaz baz = (IBaz)faq; int r2 = baz.MethodY(123.45); Console.WriteLine("{0}", r); Console.WriteLine("Sample Done"); return(ret); }
public FaqController(IFaq faqService) { _faqService = faqService; }
public FaqController(IFaq faq) { _faq = faq; }
public FAQController(IFaq faqService) { this.faqService = faqService; }