/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public MethodInfoCall() { _instanceOne = new MyClass(); _instanceTwo = new MyAnotherClass(); _instanceOneCaller = new MethodInfoCaller <MyClass>(); _instanceTwoCaller = new MethodInfoCaller <MyAnotherClass>(); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public DelegateCall() { _instanceOne = new MyClass(); _instanceTwo = new MyAnotherClass(); _instanceOneCaller = new DelegateCaller <MyClass>(); _instanceTwoCaller = new DelegateCaller <MyAnotherClass>(); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public ExpressionCall() { _instanceOne = new MyClass(); _instanceTwo = new MyAnotherClass(); _instanceOneCaller = new ExpressionCaller <MyClass>(); _instanceTwoCaller = new ExpressionCaller <MyAnotherClass>(); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public ClassCall() { _instanceOne = new MyClass(); _instanceTwo = new MyAnotherClass(); }
public static void Invoke(this MyAnotherClass c) { /* Do something */ } }
public int Visit(MyAnotherClass c) { return c.InvokeMethod(); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public VisitorCall() { _visitor = new Visitor(); _instanceOne = new MyClass(); _instanceTwo = new MyAnotherClass(); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public DynamicMethodCall() { _instanceOne = new MyClass(); _instanceTwo = new MyAnotherClass(); }
public static void PrintName(MyAnotherClass baseClass) { Console.WriteLine("MyAnotherClass"); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public ExtensionMethodCall() { _instanceOne = new MyClass(); _instanceTwo = new MyAnotherClass(); }
public int Visit(MyAnotherClass c) { return(c.InvokeMethod()); }
public static int InvokeMethodEx(this MyAnotherClass c) { return(c.InvokeMethod()); }