/// <summary> /// Implements IDisposable logic. /// </summary> /// <param name="isDisposing">True if being called from Dispose.</param> private void Dispose(bool isDisposing) { if (isDisposing) { if (_windowProxy != null) { _windowProxy.Dispose(); _windowProxy = null; } } }
/// <summary> /// Provides a one-time, pre-processing functionality for the cmdlet. /// </summary> protected override void BeginProcessing() { // Set up the ExpressionFactory _expressionFactory = new PSPropertyExpressionFactory(); // If the value of the Title parameter is valid, use it as a window's title. if (this.Title != null) { _windowProxy = new OutWindowProxy(this.Title, OutputMode, this); } else { // Using the command line as a title. _windowProxy = new OutWindowProxy(this.MyInvocation.Line, OutputMode, this); } // Load the Type info database. _typeInfoDataBase = this.Context.FormatDBManager.GetTypeInfoDataBase(); }