Example #1
0
            internal BindScope(ofElement element, ofNode node, bool attrs)
            {
                if (element.Node != null)
                {
                    throw new InvalidOperationException("Element is already bound to another node.");
                }

                element.Node = node;
                node.Element = element;

                _last    = _currentElement;
                _current = _currentElement = element;

                if (attrs)
                {
                    try
                    {
                        ElementBinder.BindAttributes(element);
                    }
                    catch
                    {
                        Dispose();
                        throw;
                    }
                }
            }
Example #2
0
 public override void OnNodeDisposed(ofNode node)
 {
     base.OnNodeDisposed(node);
     NodesDisposedStatistic.Value = NodesDisposed.Count;
 }
Example #3
0
 public override void OnNodeRenderSkipped(ofNode node)
 {
     base.OnNodeRenderSkipped(node);
     NodesSkippedStatistic.Value = NodesSkipped.Count;
 }
Example #4
0
 public override void OnNodeInvalidated(ofNode node)
 {
     base.OnNodeInvalidated(node);
     NodesInvalidatedStatistic.Value = NodesInvalidated.Count;
 }
Example #5
0
 public virtual void OnNodeDisposed(ofNode node) => NodesDisposed.Add(node);
Example #6
0
 public override void OnNodeRendering(ofNode node)
 {
     base.OnNodeRendering(node);
     NodesRenderedStatistic.Value = NodesRendered.Count;
 }
Example #7
0
 public virtual void OnNodeInvalidated(ofNode node) => NodesInvalidated.Add(node);
Example #8
0
 public virtual void OnNodeRenderSkipped(ofNode node) => NodesSkipped.Add(node);
Example #9
0
 public virtual void OnNodeRendering(ofNode node) => NodesRendered.Add(node);
Example #10
0
 void Load(NodeConnector connector) => _node = connector.Node.CreateChild();
Example #11
0
 /// <summary>
 /// Creates a new <see cref="NodeConnector"/>.
 /// </summary>
 /// <param name="node">Node to which descendants will connect.</param>
 public NodeConnector(ofNode node)
 {
     Node = node;
 }