Example #1
0
 /// <summary>
 ///     For display
 /// </summary>
 /// <returns></returns>
 internal virtual void Render(ConsoleStringBuilderInterlaced sb)
 {
     sb
     .AppendInterlacedLine("new GenericQueryPart {")
     .Up()
     .AppendInterlacedLine("QueryCommand = \"{0}\",", Prefix)
     .AppendInterlacedLine("Builder = \"{0}\",", Builder != null ? Builder.GetType().Name : "{NULL}")
     .AppendInterlaced("Parameter[{0}] = ", QueryParameters.Count());
     if (QueryParameters.Any())
     {
         sb.AppendInterlacedLine("{")
         .Up();
         foreach (var queryParameter in QueryParameters.Cast <QueryParameter>())
         {
             queryParameter.Render(sb);
             sb.AppendLine(",");
         }
         sb.Down()
         .AppendInterlacedLine("}");
     }
     else
     {
         sb.AppendLine("{}");
     }
     sb.Down()
     .AppendInterlaced("}");
     //return string.Format("{{QueryCommand = {0}, Parameter = [{1}]}}", Prefix, paraString);
 }