Пример #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;
                    }
                }
            }