示例#1
0
        /// <summary>
        /// Appends the script to represent this object to the StringBuilder.
        /// </summary>
        /// <param name="builder">The StringBuilder to which the Javascript is appended.</param>
        /// <param name="options">The options to use when appending JavaScript</param>
        /// <param name="allowReservedWords"></param>
        internal protected override void AppendScript(StringBuilder builder, ScriptOptions options, bool allowReservedWords)
        {
            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }

            InternalAppendScript(builder, options);

            if (ElseStatement != null)
            {
                builder.Append(" else ");
                ElseStatement.AppendScript(builder, options, allowReservedWords);
                ElseStatement.AppendRequiredTerminator(builder);
            }
        }