예제 #1
0
 /// <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>();
 }
예제 #2
0
 /// <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>();
 }
예제 #3
0
 /// <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>();
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public ClassCall()
 {
     _instanceOne = new MyClass();
     _instanceTwo = new MyAnotherClass();
 }
예제 #5
0
		public static void Invoke(this MyAnotherClass c) { /* Do something */ } }
예제 #6
0
 public int Visit(MyAnotherClass c)
 {
     return c.InvokeMethod();
 }
예제 #7
0
 /// <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();
 }
예제 #8
0
 /// <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");
 }
예제 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public ClassCall()
 {
     _instanceOne = new MyClass();
     _instanceTwo = new MyAnotherClass();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public ExtensionMethodCall()
 {
     _instanceOne = new MyClass();
     _instanceTwo = new MyAnotherClass();
 }
예제 #12
0
 public int Visit(MyAnotherClass c)
 {
     return(c.InvokeMethod());
 }
예제 #13
0
 /// <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();
 }
예제 #14
0
 public static int InvokeMethodEx(this MyAnotherClass c)
 {
     return(c.InvokeMethod());
 }
예제 #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public ExtensionMethodCall()
 {
     _instanceOne = new MyClass();
     _instanceTwo = new MyAnotherClass();
 }