本文整理匯總了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);
}
}