Microsoft.ManagementConsole.MmcListView.ChangeResultNodeSelection C# (CSharp) Method

ChangeResultNodeSelection() private method

private ChangeResultNodeSelection ( ResultNode node, bool selectionState ) : void
node ResultNode
selectionState bool
return void
        internal void ChangeResultNodeSelection(ResultNode node, bool selectionState)
        {
            base.ThrowIfShutdown("SendSelectionRequest");
            int index = this.ResultNodes.IndexOf(node);
            if (index == -1)
            {
                throw new ArgumentException(Microsoft.ManagementConsole.Internal.Utility.LoadResourceString(Microsoft.ManagementConsole.Internal.Strings.ListViewChangeResultNodeSelectionNotExist));
            }
            if (!base.Initialized || !base.Visible)
            {
                TraceSources.ExecutiveSource.TraceEvent(TraceEventType.Warning, 12, "Ignoring selection request since view hasn't been initialized or is hidden.");
            }
            else
            {
                ISnapInPlatform snapInPlatform = base.SnapIn.SnapInPlatform;
                if (snapInPlatform == null)
                {
                    throw Microsoft.ManagementConsole.Internal.Utility.CreateClassNotInitializedException("MmcListView", "ChangeResultNodeSelection");
                }
                SelectResultNodeCommand command = new SelectResultNodeCommand();
                command.ViewInstanceId = base.ViewInstanceId;
                command.SelectionState = selectionState;
                command.Index = index;
                snapInPlatform.ProcessCommand(command);
            }
        }