本文整理汇总了C#中ITag.IsEndTag方法的典型用法代码示例。如果您正苦于以下问题:C# ITag.IsEndTag方法的具体用法?C# ITag.IsEndTag怎么用?C# ITag.IsEndTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITag
的用法示例。
在下文中一共展示了ITag.IsEndTag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsTagToBeEndedFor
/// <summary> Determine if the current tag should be terminated by the given tag.
/// Examines the 'enders' or 'end tag enders' lists of the current tag
/// for a match with the given tag. Which list is chosen depends on whether
/// tag is an end tag ('end tag enders') or not ('enders').
/// </summary>
/// <param name="current">The tag that might need to be ended.
/// </param>
/// <param name="tag">The candidate tag that might end the current one.
/// </param>
/// <returns> <code>true</code> if the name of the given tag is a member of
/// the appropriate list.
/// </returns>
public bool IsTagToBeEndedFor(ITag current, ITag tag)
{
System.String name;
System.String[] ends;
bool ret;
ret = false;
name = tag.TagName;
if (tag.IsEndTag())
ends = current.EndTagEnders;
else
ends = current.Enders;
for (int i = 0; i < ends.Length; i++)
if (name.ToUpper().Equals(ends[i].ToUpper()))
{
ret = true;
break;
}
return (ret);
}