本文整理汇总了C#中SharpKit.Html.Node.As方法的典型用法代码示例。如果您正苦于以下问题:C# Node.As方法的具体用法?C# Node.As怎么用?C# Node.As使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpKit.Html.Node
的用法示例。
在下文中一共展示了Node.As方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: walkChildren
private void walkChildren(Node parentNode, AbstractBehavior parentBehavior = null)
{
var node = parentNode.firstChild;
if (extensionsToBeApplied == null && (parentNode.nodeType == Node.ELEMENT_NODE)) {
//We build our extension cache from the first element we find
entryElement = parentNode.As<HtmlElement>();
extensionsToBeApplied = styleExtensionManager.getExtensionsForFragment(entryElement);
}
while (node != null) {
investigateNode(node, parentBehavior);
node = node.nextSibling;
}
}
示例2: investigateNode
private void investigateNode(Node node, InjectionClassBuilder classBuilder, AbstractBehavior parentBehavior)
{
if (node.nodeType == Node.ELEMENT_NODE) {
//Just an optimization, need to create constants for all of these things
if (node.nodeName == "SCRIPT" || node.nodeName == "META") {
return;
}
if ( node.nodeName == "LINK" ) {
investigateLinkElement(node.As<HtmlLinkElement>());
} else {
investigateDomElement(node.As<HtmlElement>(), classBuilder, parentBehavior);
}
} else if (node.nodeType == Node.TEXT_NODE) {
//This is a text node, check to see if it needs internationalization
localizationProvider.investigateTextNode(node);
} else {
walkChildren(node, classBuilder, parentBehavior);
}
}
示例3: investigateNode
private void investigateNode(Node node, AbstractBehavior parentBehavior)
{
if (node.nodeType == Node.ELEMENT_NODE) {
if (extensionsToBeApplied == null) {
//We build our extension cache from the first element we find
entryElement = node.As<HtmlElement>();
extensionsToBeApplied = styleExtensionManager.getExtensionsForFragment(entryElement);
}
//Just an optimization, need to create constants for all of these things.... removed as kendo uses script nodes for templates node.nodeName == "SCRIPT" ||
if (node.nodeName == "META") {
return;
}
if ( node.nodeName == "LINK" ) {
investigateLinkElement(node.As<HtmlLinkElement>());
} else {
investigateDomElement(node.As<HtmlElement>(), parentBehavior);
}
} else if (node.nodeType == Node.TEXT_NODE) {
//This is a text node, check to see if it needs internationalization
localizationProvider.investigateTextNode(node);
} else {
walkChildren(node, parentBehavior);
}
}