/// <summary> /// Returns a VARBINARY parameter value. /// </summary> /// <param name="value">The parameter value.</param> /// <param name="size">The parameter size.</param> /// <returns>A <see cref="IDbParameterValue" />.</returns> public IDbParameterValue VarBinary(byte[] value, TSqlVarBinarySize size) { if (value == null) { return(new TSqlVarBinaryNullValue(size)); } return(new TSqlVarBinaryValue(value, size)); }
/// <summary> /// Initializes a new instance of the <see cref="TSqlVarBinaryValue" /> class. /// </summary> /// <param name="value">The parameter value.</param> /// <param name="size">The parameter size.</param> /// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="value" /> is <c>null</c>.</exception> public TSqlVarBinaryValue(byte[] value, TSqlVarBinarySize size) { if (value == null) { throw new ArgumentNullException("value"); } _value = value; _size = size; }
/// <summary> /// Initializes a new instance of the <see cref="TSqlVarBinaryNullValue" /> class. /// </summary> /// <param name="size">The size.</param> public TSqlVarBinaryNullValue(TSqlVarBinarySize size) { _size = size; }