예제 #1
0
 internal static IAsyncResult BeginOperation(Action <IAsyncContext> operation, AsyncConfig asyncConfig, [CallerMemberName] string beginMethod = null)
 {
예제 #2
0
 internal AsyncResultContext(string beginMethod, Action <IAsyncContext> operation, AsyncConfig asyncConfig)
 {
     Operation       = operation;
     BeginMethodName = beginMethod;
     if (asyncConfig == null)
     {
         return;
     }
     MaxDegreeOfParallelism = asyncConfig.MaxDegreeOfParallelism;
     callback                  = asyncConfig.CompletedCallback;
     AsyncState                = asyncConfig.State;
     throwIfCanceled           = asyncConfig.ThrowIfCanceled;
     isCancelRequestedCallback = asyncConfig.IsCancelRequestedCallback;
     Progress                  = asyncConfig.Progress;
 }