Smrf.NodeXL.ExcelTemplate.TwitterSearchNetworkStringUtil.GetTopGraphMetricValues C# (CSharp) Method

GetTopGraphMetricValues() public static method

public static GetTopGraphMetricValues ( Int32>.Dictionary stringCounts, Int32 maximumTopStrings, List &topStrings, List &topStringCounts ) : void
stringCounts Int32>.Dictionary
maximumTopStrings System.Int32
topStrings List
topStringCounts List
return void
    GetTopGraphMetricValues
    (
        Dictionary<String, Int32> stringCounts,
        Int32 maximumTopStrings,
        out List<GraphMetricValueOrdered> topStrings,
        out List<GraphMetricValueOrdered> topStringCounts
    )
    {
        Debug.Assert(stringCounts != null);
        Debug.Assert(maximumTopStrings > 0);

        topStrings = new List<GraphMetricValueOrdered>();
        topStringCounts = new List<GraphMetricValueOrdered>();

        // Sort the Dictionary by descending string counts.

        foreach ( String sKey in GetTopStrings(
            stringCounts, maximumTopStrings) )
        {
            topStrings.Add( new GraphMetricValueOrdered(sKey) );

            topStringCounts.Add(
                new GraphMetricValueOrdered( stringCounts[sKey] ) );
        }
    }