Microsoft.ManagementConsole.AuxiliarySelectionDataCollection.FindMatchingSelectionId C# (CSharp) Method

FindMatchingSelectionId() public method

public FindMatchingSelectionId ( object selectionObject, int &selectionId ) : bool
selectionObject object
selectionId int
return bool
        public bool FindMatchingSelectionId(object selectionObject, out int selectionId)
        {
            selectionId = -1;
            if (selectionObject == null)
            {
                throw new ArgumentNullException("selectionObject");
            }
            foreach (AuxiliarySelectionData data in this._selections.Values)
            {
                object selectionObjectB = data.SelectionObject;
                if ((selectionObjectB != null) && Microsoft.ManagementConsole.Internal.Utility.CompareSelectionObjects(selectionObject, selectionObjectB))
                {
                    selectionId = data.Id;
                    return true;
                }
            }
            return false;
        }
AuxiliarySelectionDataCollection