Esempio n. 1
0
 void IDisposable.Dispose()
 {
     if (this.updateContext != null)
     {
         this.updateContext.EndUpdate();
         this.updateContext = (CrossDocumentUpdateContext)null;
     }
     if (this.crossDocumentContextToken != null)
     {
         this.crossDocumentContextToken.Dispose();
         this.crossDocumentContextToken = (IDisposable)null;
     }
     GC.SuppressFinalize((object)this);
 }
Esempio n. 2
0
            public CrossDocumentUpdateToken(SilverlightSceneView sceneView)
            {
                bool shouldDelay = !sceneView.IsEditingOutOfPlace && sceneView.Document == sceneView.Document.ApplicationSceneDocument;

                if (shouldDelay)
                {
                    this.resourcesHost         = (IResourceDictionaryHost)sceneView.imageHost;
                    this.appResourcesHostToken = sceneView.InstanceBuilderContext.ChangeResourceDictionaryHost(this.resourcesHost);
                    this.resourcesHost.BeginInstanceBuilding(sceneView.InstanceBuilderContext);
                }
                this.updateContext             = new CrossDocumentUpdateContext((IViewRootResolver)sceneView.DesignerContext.ViewRootResolver);
                this.crossDocumentContextToken = sceneView.InstanceBuilderContext.ChangeCrossDocumentUpdateContext((ICrossDocumentUpdateContext)this.updateContext);
                this.updateContext.BeginUpdate(shouldDelay);
            }
Esempio n. 3
0
 void IDisposable.Dispose()
 {
     if (this.appResourcesHostToken != null)
     {
         this.appResourcesHostToken.Dispose();
         this.appResourcesHostToken = (IDisposable)null;
     }
     if (this.resourcesHost != null)
     {
         this.resourcesHost.EndInstanceBuilding();
         this.resourcesHost = (IResourceDictionaryHost)null;
     }
     if (this.updateContext != null)
     {
         this.updateContext.EndUpdate();
         this.updateContext = (CrossDocumentUpdateContext)null;
     }
     if (this.crossDocumentContextToken != null)
     {
         this.crossDocumentContextToken.Dispose();
         this.crossDocumentContextToken = (IDisposable)null;
     }
     GC.SuppressFinalize((object)this);
 }
Esempio n. 4
0
 public CrossDocumentUpdateToken(SceneView sceneView)
 {
     this.updateContext             = new CrossDocumentUpdateContext((IViewRootResolver)sceneView.DesignerContext.ViewRootResolver);
     this.crossDocumentContextToken = sceneView.InstanceBuilderContext.ChangeCrossDocumentUpdateContext((ICrossDocumentUpdateContext)this.updateContext);
     this.updateContext.BeginUpdate(false);
 }