Exemple #1
0
 internal DispatcherOperation(
     Dispatcher dispatcher,
     Delegate method,
     DispatcherPriority priority,
     object[] args,
     CancellationToken cancellationToken,
     DispatcherOperationTaskSource taskSource)
 {
     Dispatcher             = dispatcher;
     this.method            = method;
     Priority               = priority;
     this.args              = args;
     this.cancellationToken = cancellationToken;
     this.taskSource        = taskSource;
     Status = DispatcherOperationStatus.Pending;
 }
        internal DispatcherOperation(
            Dispatcher dispatcher,
            Delegate method,
            DispatcherPriority priority,
            object args,
            int numArgs,
            DispatcherOperationTaskSource taskSource,
            bool useAsyncSemantics)
        {
            _dispatcher = dispatcher;
            _method     = method;
            _priority   = priority;
            _numArgs    = numArgs;
            _args       = args;

            _executionContext = CulturePreservingExecutionContext.Capture();

            _taskSource = taskSource;
            _taskSource.Initialize(this);

            _useAsyncSemantics = useAsyncSemantics;
        }
Exemple #3
0
        internal DispatcherOperation(
            Dispatcher dispatcher,
            Delegate method,
            DispatcherPriority priority,
            object args,
            int numArgs,
            DispatcherOperationTaskSource taskSource,
            bool useAsyncSemantics)
        {
            _dispatcher = dispatcher;
            _method = method;
            _priority = priority;
            _numArgs = numArgs;
            _args = args;

            _executionContext = ExecutionContext.Capture();

            _taskSource = taskSource;
            _taskSource.Initialize(this);
            
            _useAsyncSemantics = useAsyncSemantics;
        }