MicroLite.Builder.SelectSqlBuilder.AddFunctionCall C# (CSharp) Method

AddFunctionCall() private method

private AddFunctionCall ( string functionName, string columnName, string columnAlias ) : void
functionName string
columnName string
columnAlias string
return void
        private void AddFunctionCall(string functionName, string columnName, string columnAlias)
        {
            if (string.IsNullOrEmpty(columnName))
            {
                throw new ArgumentException(ExceptionMessages.ArgumentNullOrEmpty.FormatWith("columnName"));
            }

            if (string.IsNullOrEmpty(columnAlias))
            {
                throw new ArgumentException(ExceptionMessages.ArgumentNullOrEmpty.FormatWith("columnAlias"));
            }

            if (this.InnerSql.Length > 7)
            {
                this.InnerSql.Append(',');
            }

            this.InnerSql.Append(functionName)
                .Append('(')
                .Append(this.SqlCharacters.EscapeSql(columnName))
                .Append(") AS ")
                .Append(columnAlias);
        }