public ResolvedContentNode(ControlResolverMetadata metadata, DothtmlNode node, List<ResolvedControl> content, DataContextStack dataContext) { Metadata = metadata; DothtmlNode = node; Content = content; DataContextTypeStack = dataContext; }
private IEnumerable <DothtmlNode> GetHierarchyPrivate() { DothtmlNode currentNode = LastFoundNode; while (currentNode != null) { yield return(currentNode); currentNode = currentNode.ParentNode; } }
public bool Condition(DothtmlNode node) { int tagEnd = node.StartPosition + node.Length; if (node is DothtmlElementNode) { var element = node as DothtmlElementNode; tagEnd = element.GetContentEndPosition() + (element.CorrespondingEndTag?.Length ?? 0); } //This is also enough for RootNode return(node.StartPosition <= CursorPosition && CursorPosition < tagEnd); }
public ResolvedTreeRoot(ControlResolverMetadata metadata, DothtmlNode node, DataContextStack dataContext) : base(metadata, node, dataContext) { }
public void Visit(DothtmlRootNode root) { LastFoundNode = root; }
public void Visit(DothtmlElementNode element) { LastFoundNode = element; }
public void Visit(DothtmlValueTextNode textValue) { LastFoundNode = textValue; }
public void Visit(DothtmlBindingNode binding) { LastFoundNode = binding; }
public void Visit(DothtmlDirectiveNode directive) { LastFoundNode = directive; }
public void Visit(DothtmlLiteralNode literal) { LastFoundNode = literal; }
public void Visit(DotHtmlCommentNode comment) { LastFoundNode = comment; }
public void Visit(DothtmlValueBindingNode bindingValue) { LastFoundNode = bindingValue; }
public void Visit(DothtmlAttributeNode attribute) { LastFoundNode = attribute; }
public ResolvedContentNode(ControlResolverMetadata metadata, DothtmlNode node, DataContextStack dataContext) : this(metadata, node, new List<ResolvedControl>(), dataContext) { }
public void Visit(DothtmlNameNode name) { LastFoundNode = name; }
public bool Condition(DothtmlNode node) { return(true); }
public static bool IsNotEmpty(this DothtmlNode node) { return(!(node is DotHtmlCommentNode) && !((node is DothtmlLiteralNode) && string.IsNullOrWhiteSpace((node as DothtmlLiteralNode).Value))); }