Exemplo n.º 1
0
        void Dispose()
        {
            DocumentRegistry.Remove(this);
            callbackRegistration?.Dispose();
            var workspace = Runtime.PeekService <RootWorkspace> ();

            if (workspace != null)
            {
                workspace.ItemRemovedFromSolution -= OnEntryRemoved;
            }

            UnsubscribeControllerEvents();
            if (view != null)
            {
                view.ActiveViewInHierarchyChanged -= ActiveViewInHierarchyChanged;
                view.IsRoot = false;
                view.Dispose();                  // This will also dispose the controller
            }

            window.CloseRequested -= Window_CloseRequested;
            window = null;

            contentCallbackRegistry           = null;
            contentActiveViewCallbackRegistry = null;
        }
Exemplo n.º 2
0
 ContentCallbackRegistry GetCallbackRegistry()
 {
     if (contentCallbackRegistry == null)
     {
         contentCallbackRegistry = new ContentCallbackRegistry(GetContentIncludingAllViews);
     }
     return(contentCallbackRegistry);
 }
Exemplo n.º 3
0
        internal void Dispose()
        {
            DocumentRegistry.Remove(this);
            callbackRegistration?.Dispose();
            var workspace = Runtime.PeekService <RootWorkspace> ();

            if (workspace != null)
            {
                workspace.ItemRemovedFromSolution -= OnEntryRemoved;
            }

            UnsubscribeControllerEvents();
            window.SetRootView(null);
            view.IsRoot = false;
            view.Dispose();              // This will also dispose the controller

            window = null;

            contentCallbackRegistry           = null;
            contentActiveViewCallbackRegistry = null;
        }