Smrf.NodeXL.Visualization.Wpf.CollapsedGroupDrawingManager.GetAnchorVertexIndexes C# (CSharp) Method

GetAnchorVertexIndexes() protected method

protected GetAnchorVertexIndexes ( Int32 iAnchorVertices ) : Int32>.Dictionary
iAnchorVertices System.Int32
return Int32>.Dictionary
    GetAnchorVertexIndexes
    (
        Int32 iAnchorVertices
    )
    {
        Debug.Assert(iAnchorVertices >= 0);
        Debug.Assert(m_oCollapsedGroup != null);
        Debug.Assert(m_oCollapsedGroupVertex != null);
        Debug.Assert(m_oCollapsedGroupAttributes != null);
        AssertValid();

        Dictionary<String, Int32> oAnchorVertexIndexes =
            new Dictionary<String, Int32>(iAnchorVertices);

        for (Int32 iAnchorVertexIndex = 0;
            iAnchorVertexIndex < iAnchorVertices;
            iAnchorVertexIndex++)
        {
            String sAnchorVertexName;

            if ( m_oCollapsedGroupAttributes.TryGetValue(

                CollapsedGroupAttributeKeys.GetAnchorVertexNameKey(
                    iAnchorVertexIndex),

                out sAnchorVertexName) )
            {
                oAnchorVertexIndexes[sAnchorVertexName] = iAnchorVertexIndex;
            }
        }

        return (oAnchorVertexIndexes);
    }