Пример #1
0
 public SqlDefinitionBuilder(ITemplateOptions options = null)
 {
     this.root      = new CompositeSqlDefinitionElement(this);
     this.Text      = new SqlTextAppender(this, root);
     this.Parameter = new SqlParameterAppender(this, root);
     this.Options   = options;
 }
Пример #2
0
 public void EndBlock()
 {
     if (blockElement != null && blockElement.HasBlock)
     {
         blockElement.EndBlock();
         return;
     }
     blockElement = null;
 }
Пример #3
0
 public void StartBlock(string name)
 {
     if (blockElement != null)
     {
         blockElement.StartBlock(name);
         return;
     }
     blockElement = new CompositeSqlDefinitionElement(this.builder, this, name);
     this.elements.Add(blockElement);
 }
Пример #4
0
 public SqlTextAppender(SqlDefinitionBuilder builder, CompositeSqlDefinitionElement elements)
 {
     this.builder  = builder;
     this.elements = elements;
 }
Пример #5
0
 public CompositeSqlDefinitionElement(ISqlDefinitionBuilder builder, CompositeSqlDefinitionElement parent, string name)
 {
     this.builder = builder;
     this.Name    = name;
     this.parent  = parent;
 }