Ejemplo n.º 1
0
 internal void ChangeCost(DataBindOperation op, int delta)
 {
     lock (_crossThreadQueueLock)
     {
         op.Cost          += delta;
         _crossThreadCost += delta;
     }
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
 internal void ChangeCost(DataBindOperation op, int delta)
 {
     lock (_crossThreadQueueLock)
     {
         op.Cost += delta;
         _crossThreadCost += delta;
     }
 }
Ejemplo n.º 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;
        }