private List<int> GetOneFolderImplicitSelection(HierarchyProperty property, Hashtable selection, bool rootSelected, ref bool retHasSelectionInside, out bool eof)
{
int depth = property.depth;
bool flag = false;
bool flag2 = false;
eof = false;
List<int> list = new List<int>();
List<int> list2 = new List<int>();
List<int> collection = new List<int>();
do
{
if (property.depth > depth)
{
collection.AddRange(this.GetOneFolderImplicitSelection(property, selection, rootSelected || flag2, ref flag, out eof));
}
if ((depth != property.depth) || eof)
{
break;
}
if (rootSelected && !flag)
{
list.Add(property.instanceID);
}
if (selection.Contains(property.instanceID))
{
list2.Add(property.instanceID);
flag = true;
flag2 = true;
}
else
{
flag2 = false;
}
eof = !property.Next(null);
}
while (!eof);
retHasSelectionInside |= flag;
List<int> list4 = (rootSelected && !flag) ? list : list2;
list4.AddRange(collection);
return list4;
}