public void Dispose() { this._commands.Clear(); this._barManager = null; this._caller = null; this._controllerFinder = null; this._dynamicGroups.Clear(); }
public CommandManager(IWorkSpaceContext caller, BarManager manager) { this._commands = new Dictionary <string, IUICommand>(); this._caller = caller; this._barManager = manager; this._dynamicGroups = new Dictionary <string, Codon>(); this._controllerFinder = caller.ControllerFinder; }
public RibbonFormWorkspace(ActionParameters parameters) { InitializeComponent(); EventAggregationManager.AddListener(this); _wokspaceID = Guid.NewGuid(); _config = new ConfigService.ConfigService(); _workspaceContext = new WorkSpaceContext(this, this, this, parameters, this); }
protected override void Dispose(bool disposing) { if (disposing) { EventAggregationManager.RemoveListener(this); if (_mainController != null) { _mainController.Dispose(); _mainController = null; } ActionResult = null; ActiveView = null; if (_controllers != null) { _controllers.Clear(); _controllers = null; } if (_views != null) { _views.Clear(); _views = null; } if (components != null) { components.Dispose(); } BindingContext = null; if (this._commandManager != null) { this._commandManager.Dispose(); this._commandManager = null; } if (this._workspaceContext != null) { this._workspaceContext.Dispose(); this._workspaceContext = null; } } base.Dispose(disposing); LoggingService.InfoFormatted(" Start SuppressFinalize WorkSpace {0}:{1}", this.ObjectName, DateTime.Now.ToString("HH:mm:ss fff")); GC.Collect(); GC.SuppressFinalize(this); LoggingService.InfoFormatted(" End SuppressFinalize WorkSpace {0}:{1}", this.ObjectName, DateTime.Now.ToString("HH:mm:ss fff")); }