Microsoft.ManagementConsole.SelectionData.Clear C# (CSharp) Method

Clear() public method

public Clear ( ) : void
return void
        public void Clear()
        {
            this.ThrowIfViewShutdown("Clear");
            MmcListView view = this._view as MmcListView;
            if (view != null)
            {
                if (!view.SnapInProcessingSelectionChange)
                {
                    throw new InvalidOperationException(Microsoft.ManagementConsole.Internal.Utility.LoadResourceString(Microsoft.ManagementConsole.Internal.Strings.SelectionDataClearInvalidFromList));
                }
                if (view.SelectedNodes.Count > 0)
                {
                    throw new InvalidOperationException(Microsoft.ManagementConsole.Internal.Utility.LoadResourceString(Microsoft.ManagementConsole.Internal.Strings.SelectionDataClearInvalidClear));
                }
            }
            this.ChangeSelection(null, Microsoft.ManagementConsole.Internal.SelectionCardinality.None, new Guid[0], new WritableSharedData());
        }