本文整理汇总了C#中IHTMLItem.IsValid方法的典型用法代码示例。如果您正苦于以下问题:C# IHTMLItem.IsValid方法的具体用法?C# IHTMLItem.IsValid怎么用?C# IHTMLItem.IsValid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IHTMLItem
的用法示例。
在下文中一共展示了IHTMLItem.IsValid方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (item is IInlineItem)
{
return item.IsValid();
}
if (item is SimpleHTML5Text)
{
return item.IsValid();
}
return false;
}
示例2: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (item is DefinitionDescription)
{
return item.IsValid();
}
if (item is DefinitionTerms)
{
return item.IsValid();
}
return false;
}
示例3: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (item is Area)
{
return item.IsValid();
}
if (item is IBlockElement)
{
return item.IsValid();
}
return false;
}
示例4: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (item is Option)
{
return item.IsValid();
}
return false;
}
示例5: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (item is IInlineItem)
{
// TODO: check for label presence at depth
if (item is Label)
{
return false;
}
return item.IsValid();
}
if (item is SimpleHTML5Text)
{
return item.IsValid();
}
return false;
}
示例6: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
// TODO: full check for ruby sequence
if (item is IRubyItem)
{
return item.IsValid();
}
return false;
}
示例7: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (item is Title ||
item is Base ||
item is Link ||
item is Meta ||
item is Script ||
item is Style ||
item is NoScript
)
{
return item.IsValid();
}
return false;
}
示例8: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (item is Header)
{
return false;
}
if (item is Footer)
{
return false;
}
if (item is IInlineItem ||
item is IBlockElement ||
item is SimpleHTML5Text)
{
return item.IsValid();
}
return false;
}
示例9: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (Subitems.Count >= 2) // no more than two sub elements
{
return false;
}
if (Subitems.Count == 0) // head have to be first
{
if (!(item is Head) )
{
return false;
}
}
if (Subitems.Count == 1) // body have to be second
{
if (!(item is Body) )
{
return false;
}
}
return item.IsValid();
}
示例10: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (item is TableData)
{
return item.IsValid();
}
if (item is TableHeaderCell)
{
return item.IsValid();
}
return false;
}
示例11: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
if (
!(item is Input) &&
!(item is TextArea) &&
!(item is Button) &&
!(item is Select) &&
!(item is Option) &&
!(item is OptionGroup) &&
!(item is Label) &&
!(item is FieldSet))
{
return false;
}
return item.IsValid();
}
示例12: IsValidSubType
protected override bool IsValidSubType(IHTMLItem item)
{
// may appear only once and only as first element
if (item is TableCaption)
{
if (Subitems.Count > 0)
{
return false;
}
IHTMLItem seekItem = Subitems.Find(x => x is TableCaption);
if (seekItem != null)
{
return false;
}
return item.IsValid();
}
if (item is ColElement)
{
return item.IsValid();
}
if (item is ColGroup)
{
return item.IsValid();
}
if (item is TableBody)
{
IHTMLItem seekItem = Subitems.Find(x => x is TableBody);
if (seekItem != null)
{
return false;
}
seekItem = Subitems.Find(x => x is TableRow);
if (seekItem != null)
{
return false;
}
return item.IsValid();
}
if (item is TableRow)
{
IHTMLItem seekItem = Subitems.Find(x => x is TableBody);
if (seekItem != null)
{
return false;
}
seekItem = Subitems.Find(x => x is TableHead);
if (seekItem != null)
{
return false;
}
seekItem = Subitems.Find(x => x is TableFooter);
if (seekItem != null)
{
return false;
}
return item.IsValid();
}
return false;
}