예제 #1
0
 /// <summary>
 /// Gets the command text.
 /// </summary>
 /// <returns>The command text.</returns>
 public string GetCommandText(ICommand command, CommandOptions options = null)
 {
     if (options == null)
     {
         options = new CommandOptions();
     }
     StringWriter writer = new StringWriter();
     FormattingVisitor visitor = new FormattingVisitor(writer, options);
     visitor.Visit(command);
     return writer.ToString();
 }
예제 #2
0
        /// <summary>
        /// Gets the command text.
        /// </summary>
        /// <returns>The command text.</returns>
        public string GetCommandText(ICommand command, CommandOptions options = null)
        {
            if (options == null)
            {
                options = new CommandOptions();
            }
            StringWriter      writer  = new StringWriter();
            FormattingVisitor visitor = new FormattingVisitor(writer, options);

            visitor.Visit(command);
            return(writer.ToString());
        }