示例#1
0
        // --------------------------------
        // - End public properties region -
        // --------------------------------
        #endregion



        #region - Public methods -
        // -------------------------------
        // - Begin public methods region -
        // -------------------------------

        /// <summary>
        /// Accept method in the context of the "Hierarchical Visitor Pattern".
        /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
        /// </summary>
        /// <param name="attributeSetVisitor">The Attribute Set visitor.</param>
        /// <returns>
        /// true: continue traversing the siblings of this instance.
        /// false: stop traversing the siblings of this instance.
        /// </returns>
        public override bool Accept(AttributeSetVisitor attributeSetVisitor)
        {
            if (attributeSetVisitor.VisitEnterSequenceAttribute(this))
            {
                foreach (SequenceItem sequenceItem in this.sequenceItems)
                {
                    if (!sequenceItem.Accept(attributeSetVisitor))
                    {
                        break;
                    }
                }
            }

            return(attributeSetVisitor.VisitLeaveSequenceAttribute(this));
        }
示例#2
0
        // --------------------------------
        // - End public properties region -
        // --------------------------------
        #endregion



        #region - Public methods -
        // -------------------------------
        // - Begin public methods region -
        // -------------------------------

        /// <summary>
        /// Accept method in the context of the "Hierarchical Visitor Pattern".
        /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
        /// </summary>
        /// <param name="attributeSetVisitor">The Attribute Set visitor.</param>
        /// <returns>
        /// true: continue traversing the siblings of this instance.
        /// false: stop traversing the siblings of this instance.
        /// </returns>
        public bool Accept(AttributeSetVisitor attributeSetVisitor)
        {
            if (attributeSetVisitor.VisitEnterSequenceItem(this))
            {
                foreach (Attribute attribute in this)
                {
                    if (!attribute.Accept(attributeSetVisitor))
                    {
                        break;
                    }
                }
            }

            return(attributeSetVisitor.VisitLeaveSequenceItem(this));
        }
示例#3
0
        // --------------------------------
        // - End public properties region -
        // --------------------------------
        #endregion



        #region - Public methods -
        // -------------------------------
        // - Begin public methods region -
        // -------------------------------

        /// <summary>
        /// Accept method in the context of the "Hierarchical Visitor Pattern".
        /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
        /// </summary>
        /// <param name="attributeSetVisitor">The Attribute Set visitor.</param>
        /// <returns>
        /// true: continue traversing the siblings of this instance.
        /// false: stop traversing the siblings of this instance.
        /// </returns>
        public abstract bool Accept(AttributeSetVisitor attributeSetVisitor);
示例#4
0
        // ---------------------------
        // - End constructors region -
        // ---------------------------
        #endregion



        #region - Public methods -
        // -------------------------------
        // - Begin public methods region -
        // -------------------------------

        /// <summary>
        /// Accept method in the context of the "Hierarchical Visitor Pattern".
        /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
        /// </summary>
        /// <param name="attributeSetVisitor">The Attribute Set visitor.</param>
        /// <returns>
        /// true: continue traversing the siblings of this instance.
        /// false: stop traversing the siblings of this instance.
        /// </returns>
        public override bool Accept(AttributeSetVisitor attributeSetVisitor)
        {
            return(attributeSetVisitor.VisitSingleAttribute(this));
        }