示例#1
0
 /// <summary>
 /// Creates tag cloud html from a provided dictionary of string tags along with integer values indicating the weight of each tag. 
 /// This overload is suitable when you have a list of already weighted tags, i.e. from a database query result.
 /// </summary>
 /// <param name="weightedTags">A dictionary that takes a string for the tag text (as the dictionary key) and an integer for the tag weight (as the dictionary value).</param>
 /// <param name="generationRules">A TagCloudGenerationRules object to decide how the cloud is generated.</param>
 /// <returns>A string containing the html markup of the tag cloud.</returns>
 public static string TagCloud(this HtmlHelper htmlHelper, IDictionary<string, int> weightedTags, TagCloudGenerationRules generationRules)
 {
     return new TagCloud.TagCloud(weightedTags, generationRules).ToString();
 }
示例#2
0
 /// <summary>
 /// Creates tag cloud html from a provided list of string tags along with integer values indicating the weight of each tag. 
 /// This overload is suitable when you have a list of already weighted tags, i.e. from a database query result.
 /// </summary>
 /// <param name="weightedTags">A list of KeyValuePair objects that take a string for the tag text and an integer for the weight of the tag.</param>
 /// <param name="generationRules">A TagCloudGenerationRules object to decide how the cloud is generated.</param>
 /// <returns>A string containing the html markup of the tag cloud.</returns>
 public static string TagCloud(this HtmlHelper htmlHelper, IEnumerable<KeyValuePair<string, int>> weightedTags, TagCloudGenerationRules generationRules)
 {
     return new TagCloud.TagCloud(weightedTags, generationRules).ToString();
 }
示例#3
0
 /// <summary>
 /// Creates tag cloud html from a provided list of string tags. 
 /// The more times a tag occures in the list, the larger weight it will get in the tag cloud.
 /// </summary>
 /// <param name="tags">A string list of tags</param>
 /// <param name="generationRules">A TagCloudGenerationRules object to decide how the cloud is generated.</param>
 /// <returns>A string containing the html markup of the tag cloud.</returns>
 public static string TagCloud(this HtmlHelper htmlHelper, IEnumerable<string> tags, TagCloudGenerationRules generationRules)
 {
     return new TagCloud.TagCloud(tags, generationRules).ToString();
 }