// Token: 0x06007725 RID: 30501 RVA: 0x00220BB3 File Offset: 0x0021EDB3
 internal XmlBindingWorker(ClrBindingWorker worker, bool collectionMode) : base(worker.ParentBindingExpression)
 {
     this._hostWorker     = worker;
     this._xpath          = base.ParentBinding.XPath;
     this._collectionMode = collectionMode;
     this._xpathType      = XmlBindingWorker.GetXPathType(this._xpath);
 }
Exemple #2
0
        // Token: 0x06007495 RID: 29845 RVA: 0x00215CA8 File Offset: 0x00213EA8
        private static object OnCompleteSetValueOperation(object arg)
        {
            AsyncSetValueRequest asyncSetValueRequest = (AsyncSetValueRequest)arg;
            ClrBindingWorker     clrBindingWorker     = (ClrBindingWorker)asyncSetValueRequest.Args[0];

            clrBindingWorker.CompleteSetValue(asyncSetValueRequest);
            return(null);
        }
Exemple #3
0
        // Token: 0x06007493 RID: 29843 RVA: 0x00215C30 File Offset: 0x00213E30
        private static object OnSetValueCallback(AsyncDataRequest adr)
        {
            AsyncSetValueRequest asyncSetValueRequest = (AsyncSetValueRequest)adr;
            ClrBindingWorker     clrBindingWorker     = (ClrBindingWorker)asyncSetValueRequest.Args[0];

            clrBindingWorker.PW.SetValue(asyncSetValueRequest.TargetItem, asyncSetValueRequest.Value);
            return(null);
        }
Exemple #4
0
        static object OnCompleteSetValueOperation(object arg)
        {
            AsyncSetValueRequest request = (AsyncSetValueRequest)arg;
            ClrBindingWorker     worker  = (ClrBindingWorker)request.Args[0];

            worker.CompleteSetValue(request);
            return(null);
        }
Exemple #5
0
        static object OnSetValueCallback(AsyncDataRequest adr)
        {
            AsyncSetValueRequest request = (AsyncSetValueRequest)adr;
            ClrBindingWorker     worker  = (ClrBindingWorker)request.Args[0];

            worker.PW.SetValue(request.TargetItem, request.Value);
            return(null);
        }
Exemple #6
0
        // Token: 0x06007494 RID: 29844 RVA: 0x00215C6C File Offset: 0x00213E6C
        private static object OnCompleteSetValueCallback(AsyncDataRequest adr)
        {
            AsyncSetValueRequest asyncSetValueRequest = (AsyncSetValueRequest)adr;
            ClrBindingWorker     clrBindingWorker     = (ClrBindingWorker)asyncSetValueRequest.Args[0];
            DataBindEngine       engine = clrBindingWorker.Engine;

            if (engine != null)
            {
                engine.Marshal(ClrBindingWorker.CompleteSetValueLocalCallback, asyncSetValueRequest, 1);
            }
            return(null);
        }
Exemple #7
0
        // Token: 0x0600748E RID: 29838 RVA: 0x00215A20 File Offset: 0x00213C20
        private static object OnGetValueCallback(AsyncDataRequest adr)
        {
            AsyncGetValueRequest asyncGetValueRequest = (AsyncGetValueRequest)adr;
            ClrBindingWorker     clrBindingWorker     = (ClrBindingWorker)asyncGetValueRequest.Args[0];
            object value = clrBindingWorker.PW.GetValue(asyncGetValueRequest.SourceItem, (int)asyncGetValueRequest.Args[1]);

            if (value == PropertyPathWorker.IListIndexOutOfRange)
            {
                throw new ArgumentOutOfRangeException("index");
            }
            return(value);
        }
Exemple #8
0
        static object OnCompleteSetValueCallback(AsyncDataRequest adr)
        {
            AsyncSetValueRequest request = (AsyncSetValueRequest)adr;
            ClrBindingWorker     worker  = (ClrBindingWorker)request.Args[0];

            DataBindEngine engine = worker.Engine;

            if (engine != null) // could be null if binding has been detached
            {
                engine.Marshal(CompleteSetValueLocalCallback, request);
            }

            return(null);
        }
Exemple #9
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        internal XmlBindingWorker(ClrBindingWorker worker, bool collectionMode) : base(worker.ParentBindingExpression)
        {
            _hostWorker = worker;
            _xpath      = ParentBinding.XPath;
            Debug.Assert(_xpath != null);

            // when collectionMode is true, we update the XmlDataCollection for XmlNodeChanges,
            // otherwise, any XmlNodeChange counts as a disastrous change that requires reset.
            _collectionMode = collectionMode;

            _xpathType = GetXPathType(_xpath);

            // PERF: it is possible to add one more optimization "mode" for the case when
            // we know the host wants to use the CurrentItem (i.e. DrillIn == Always).
            // We could be using SelectSingleNode() instead of SelectNodes(),
            // and then only watch for changes to one node instead of comparing collections.
        }
        //-----------------------------------------------------
        // 
        //  Constructors 
        //
        //----------------------------------------------------- 

        internal XmlBindingWorker(ClrBindingWorker worker, bool collectionMode) : base(worker.ParentBindingExpression)
        {
            _hostWorker = worker; 
            _xpath = ParentBinding.XPath;
            Debug.Assert(_xpath != null); 
 
            // when collectionMode is true, we update the XmlDataCollection for XmlNodeChanges,
            // otherwise, any XmlNodeChange counts as a disastrous change that requires reset. 
            _collectionMode = collectionMode;

            _xpathType = GetXPathType(_xpath);
 
            // PERF: it is possible to add one more optimization "mode" for the case when
            // we know the host wants to use the CurrentItem (i.e. DrillIn == Always). 
            // We could be using SelectSingleNode() instead of SelectNodes(), 
            // and then only watch for changes to one node instead of comparing collections.
        } 
        private void CreateWorker()
        {
            Invariant.Assert(Worker == null, "duplicate call to CreateWorker");

            _worker = new ClrBindingWorker(this, Engine);
        }
 internal PropertyPathWorker(PropertyPath path, ClrBindingWorker host, bool isDynamic, DataBindEngine engine)
     : this(path, engine)
 {
     _host = host;
     _isDynamic = isDynamic;
 }