private SqlQueryFormatResult(SqlQueryFormatter formatter, string commandText, IReadOnlyList <TypedValue> parameterValues, Dictionary <int, int> parameterIndexToPlaceholderIndexes, Dictionary <int, int> placeholderIndexToParameterIndexes) { this.Formatter = formatter; this.CommandText = commandText; this.ParameterValues = parameterValues; this.ParameterIndexToPlaceholderIndexes = parameterIndexToPlaceholderIndexes; this.PlaceholderIndexToParameterIndex = placeholderIndexToParameterIndexes; }
public SqlQueryFormatResult(SqlQueryFormatter formatter, string commandText, IReadOnlyList <TypedValue> parameterValues, IReadOnlyList <Pair <int, int> > parameterIndexToPlaceholderIndexes) { this.Formatter = formatter; this.CommandText = commandText; this.ParameterValues = parameterValues; if (parameterIndexToPlaceholderIndexes?.Count > 0) { this.ParameterIndexToPlaceholderIndexes = new Dictionary <int, int>(); this.PlaceholderIndexToParameterIndex = new Dictionary <int, int>(); foreach (var value in parameterIndexToPlaceholderIndexes) { this.ParameterIndexToPlaceholderIndexes[value.Left] = value.Right; this.PlaceholderIndexToParameterIndex[value.Right] = value.Left; } } }
public SqlQueryFormatResult(SqlQueryFormatter formatter, string commandText, IEnumerable <TypedValue> parameterValues, IReadOnlyList <Pair <int, int> > parameterIndexToPlaceholderIndexes) : this(formatter, commandText, parameterValues.ToReadOnlyCollection(), parameterIndexToPlaceholderIndexes) { }