예제 #1
0
 public void Init()
 {
     _container = new MethodContainer();
     _delegate =
         (Action<MethodContainer>)
             typeof (MethodContainer).GetMethod("MethodCall").CreateDelegate(typeof (Action<MethodContainer>));
 }
예제 #2
0
 public void Init()
 {
     var methodInfo = typeof (MethodContainer).GetMethod("MethodCall");
     var containerExpr = Expression.Parameter(typeof (MethodContainer), "container");
     var invokeExpr = Expression.Call(containerExpr, methodInfo);
     var lambda = Expression.Lambda<Action<MethodContainer>>(invokeExpr, containerExpr);
     _compiled = lambda.Compile();
     _container = new MethodContainer();
 }
예제 #3
0
 public void Init()
 {
     _container = new MethodContainer();
 }
예제 #4
0
 public void Init()
 {
     _container = new MethodContainer();
     _type = typeof (MethodContainer);
 }