public AsyncWaitCallbackMethodExecutor(CodeActivityMetadata metadata, MethodInfo asyncMethod, Activity invokingActivity,
                                        Type targetType, InArgument targetObject, Collection <Argument> parameters,
                                        RuntimeArgument returnObject,
                                        MruCache <MethodInfo, Func <object, object[], object> > funcCache,
                                        ReaderWriterLockSlim locker)
     : base(invokingActivity, targetType, targetObject, parameters, returnObject)
 {
     Fx.Assert(asyncMethod != null, "Must provide asyncMethod");
     this.asyncMethod = asyncMethod;
     this.asyncFunc   = MethodCallExpressionHelper.GetFunc(metadata, asyncMethod, funcCache, locker);
 }
 public AsyncPatternMethodExecutor(CodeActivityMetadata metadata, MethodInfo beginMethod, MethodInfo endMethod,
                                   Activity invokingActivity, Type targetType, InArgument targetObject,
                                   Collection <Argument> parameters, RuntimeArgument returnObject,
                                   MruCache <MethodInfo, Func <object, object[], object> > funcCache,
                                   ReaderWriterLockSlim locker)
     : base(invokingActivity, targetType, targetObject, parameters, returnObject)
 {
     Fx.Assert(beginMethod != null && endMethod != null, "Must provide beginMethod and endMethod");
     this.beginMethod = beginMethod;
     this.endMethod   = endMethod;
     this.beginFunc   = MethodCallExpressionHelper.GetFunc(metadata, beginMethod, funcCache, locker);
     this.endFunc     = MethodCallExpressionHelper.GetFunc(metadata, endMethod, funcCache, locker);
 }
 public bool IsTheSame(MethodInfo newMethodInfo)
 {
     return(!MethodCallExpressionHelper.NeedRetrieve(newMethodInfo, this.asyncMethod, this.asyncFunc));
 }
 public bool IsTheSame(MethodInfo newBeginMethod, MethodInfo newEndMethod)
 {
     return(!(MethodCallExpressionHelper.NeedRetrieve(newBeginMethod, this.beginMethod, this.beginFunc) ||
              MethodCallExpressionHelper.NeedRetrieve(newEndMethod, this.endMethod, this.endFunc)));
 }
Exemplo n.º 5
0
 public bool IsTheSame(MethodInfo newMethod)
 {
     return(!MethodCallExpressionHelper.NeedRetrieve(newMethod, _syncMethod, _func));
 }