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;
}