Beispiel #1
0
        /// <summary>
        /// Builds the specified inject statement.
        /// </summary>
        /// <param name="injectStatement">The inject statement.</param>
        /// <param name="paramList">The parameter list.</param>
        /// <param name="injectors">The injectors.</param>
        /// <returns></returns>
        public static StatementBuilderResult Build(string injectStatement, StatementParameterList paramList, List <StatementBuilderInject> injectors)
        {
            var injectBuilder = new StatementBuilder();

            injectBuilder.Add(injectStatement, paramList);

            return(Build(injectBuilder, injectors));
        }
Beispiel #2
0
        /// <summary>
        /// Adds the specified statement.
        /// </summary>
        /// <param name="statement">The statement.</param>
        /// <param name="paramList">The parameter list.</param>
        /// <exception cref="System.ArgumentNullException">statement</exception>
        public void Add(string statement, StatementParameterList paramList = null)
        {
            if (statement == null)
            {
                throw new ArgumentNullException(nameof(statement));
            }

            Commands.Add(new Command()
            {
                Statement = statement, ParameterList = paramList
            });
        }
Beispiel #3
0
 /// <summary>
 /// Adds the specified statement.
 /// </summary>
 /// <param name="statement">The statement.</param>
 /// <param name="paramList">The parameter list.</param>
 public void Add(StringBuilder statement, StatementParameterList paramList = null)
 {
     Add(statement.ToString(), paramList);
 }
Beispiel #4
0
 /// <summary>
 /// Builds the specified inject statement.
 /// </summary>
 /// <param name="injectStatement">The inject statement.</param>
 /// <param name="paramList">The parameter list.</param>
 /// <param name="injectors">The injectors.</param>
 /// <returns></returns>
 public static StatementBuilderResult Build(StringBuilder injectStatement, StatementParameterList paramList, List <StatementBuilderInject> injectors)
 {
     return(Build(injectStatement.ToString(), paramList, injectors));
 }