示例#1
0
 internal void ChangeCost(DataBindOperation op, int delta)
 {
     lock (_crossThreadQueueLock)
     {
         op.Cost          += delta;
         _crossThreadCost += delta;
     }
 }
示例#2
0
        // Token: 0x060074BF RID: 29887 RVA: 0x002164F4 File Offset: 0x002146F4
        internal void ChangeCost(DataBindOperation op, int delta)
        {
            object crossThreadQueueLock = this._crossThreadQueueLock;

            lock (crossThreadQueueLock)
            {
                op.Cost += delta;
                this._crossThreadCost += delta;
            }
        }
示例#3
0
        // Token: 0x060074BE RID: 29886 RVA: 0x00216470 File Offset: 0x00214670
        internal DataBindOperation Marshal(DispatcherOperationCallback method, object arg, int cost = 1)
        {
            DataBindOperation dataBindOperation    = new DataBindOperation(method, arg, cost);
            object            crossThreadQueueLock = this._crossThreadQueueLock;

            lock (crossThreadQueueLock)
            {
                this._crossThreadQueue.Enqueue(dataBindOperation);
                this._crossThreadCost += cost;
                if (this._crossThreadDispatcherOperation == null)
                {
                    this._crossThreadDispatcherOperation = base.Dispatcher.BeginInvoke(DispatcherPriority.ContextIdle, new Action(this.ProcessCrossThreadRequests));
                }
            }
            return(dataBindOperation);
        }
示例#4
0
        // Marshal some work from a foreign thread to the UI thread
        // (e.g. PropertyChanged or CollectionChanged events)
        internal DataBindOperation Marshal(DispatcherOperationCallback method, object arg, int cost = 1)
        {
            DataBindOperation op = new DataBindOperation(method, arg, cost);

            lock (_crossThreadQueueLock)
            {
                _crossThreadQueue.Enqueue(op);
                _crossThreadCost += cost;

                if (_crossThreadDispatcherOperation == null)
                {
                    _crossThreadDispatcherOperation = Dispatcher.BeginInvoke(
                        DispatcherPriority.ContextIdle,
                        (Action)ProcessCrossThreadRequests);
                }
            }

            return(op);
        }
示例#5
0
 internal void ChangeCost(DataBindOperation op, int delta)
 {
     lock (_crossThreadQueueLock)
     {
         op.Cost += delta;
         _crossThreadCost += delta;
     }
 }
示例#6
0
        // Marshal some work from a foreign thread to the UI thread
        // (e.g. PropertyChanged or CollectionChanged events)
        internal DataBindOperation Marshal(DispatcherOperationCallback method, object arg, int cost=1)
        {
            DataBindOperation op = new DataBindOperation(method, arg, cost);
            lock (_crossThreadQueueLock)
            {
                _crossThreadQueue.Enqueue(op);
                _crossThreadCost += cost;

                if (_crossThreadDispatcherOperation == null)
                {
                    _crossThreadDispatcherOperation = Dispatcher.BeginInvoke(
                        DispatcherPriority.ContextIdle,
                        (Action)ProcessCrossThreadRequests);
                }
            }

            return op;
        }