本文整理汇总了C#中ISiteMapNode.GetMetaRobotsContentString方法的典型用法代码示例。如果您正苦于以下问题:C# ISiteMapNode.GetMetaRobotsContentString方法的具体用法?C# ISiteMapNode.GetMetaRobotsContentString怎么用?C# ISiteMapNode.GetMetaRobotsContentString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISiteMapNode
的用法示例。
在下文中一共展示了ISiteMapNode.GetMetaRobotsContentString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SiteMapNodeModel
/// <summary>
/// Initializes a new instance of the <see cref="SiteMapNodeModel"/> class.
/// </summary>
/// <param name="node">The node.</param>
/// <param name="sourceMetadata">The source metadata provided by the HtmlHelper.</param>
/// <param name="maxDepth">The max depth.</param>
/// <param name="drillDownToCurrent">Should the model exceed the maxDepth to reach the current node</param>
/// <param name="startingNodeInChildLevel">Renders startingNode in child level if set to <c>true</c>.</param>
public SiteMapNodeModel(ISiteMapNode node, IDictionary<string, object> sourceMetadata, int maxDepth, bool drillDownToCurrent, bool startingNodeInChildLevel, bool visibilityAffectsDescendants)
{
if (node == null)
throw new ArgumentNullException("node");
if (sourceMetadata == null)
throw new ArgumentNullException("sourceMetadata");
if (maxDepth < 0)
throw new ArgumentOutOfRangeException("maxDepth");
this.node = node;
this.maxDepth = maxDepth;
this.startingNodeInChildLevel = startingNodeInChildLevel;
this.drillDownToCurrent = drillDownToCurrent;
this.SourceMetadata = sourceMetadata;
Key = node.Key;
Area = node.Area;
Controller = node.Controller;
Action = node.Action;
Title = node.Title;
Description = node.Description;
TargetFrame = node.TargetFrame;
ImageUrl = node.ImageUrl;
Url = node.Url;
CanonicalUrl = node.CanonicalUrl;
MetaRobotsContent = node.GetMetaRobotsContentString();
IsCurrentNode = (node == node.SiteMap.CurrentNode);
IsInCurrentPath = node.IsInCurrentPath();
IsRootNode = (node == node.SiteMap.RootNode);
IsClickable = node.Clickable;
VisibilityAffectsDescendants = visibilityAffectsDescendants;
RouteValues = node.RouteValues;
Attributes = node.Attributes;
}