Smrf.NodeXL.ExcelTemplate.GroupWorksheetReader.SkipAndHideGroups C# (CSharp) Method

SkipAndHideGroups() protected method

protected SkipAndHideGroups ( ReadWorkbookContext oReadWorkbookContext, ExcelTemplateGroupInfo>.Dictionary oGroupNameDictionary, HashSet oSkippedGroupNames, HashSet oHiddenGroupNames, IGraph oGraph ) : void
oReadWorkbookContext ReadWorkbookContext
oGroupNameDictionary ExcelTemplateGroupInfo>.Dictionary
oSkippedGroupNames HashSet
oHiddenGroupNames HashSet
oGraph IGraph
return void
    SkipAndHideGroups
    (
        ReadWorkbookContext oReadWorkbookContext,
        Dictionary<String, ExcelTemplateGroupInfo> oGroupNameDictionary,
        HashSet<String> oSkippedGroupNames,
        HashSet<String> oHiddenGroupNames,
        IGraph oGraph
    )
    {
        Debug.Assert(oReadWorkbookContext != null);
        Debug.Assert(oGroupNameDictionary != null);
        Debug.Assert(oSkippedGroupNames != null);
        Debug.Assert(oHiddenGroupNames != null);
        Debug.Assert(oGraph != null);
        AssertValid();

        foreach (String sGroupName in oSkippedGroupNames)
        {
            // Remove the group's vertices and their incident edges from the
            // graph and dictionaries.

            foreach (IVertex oVertex in
                oGroupNameDictionary[sGroupName].Vertices)
            {
                RemoveVertex(oVertex, oReadWorkbookContext, oGraph);
            }

            oGroupNameDictionary.Remove(sGroupName);
        }

        foreach (String sGroupName in oHiddenGroupNames)
        {
            foreach (IVertex oVertex in
                oGroupNameDictionary[sGroupName].Vertices)
            {
                // Hide the group's vertices and their incident edges.

                HideVertex(oVertex);
            }
        }
    }