Beispiel #1
0
 /// <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;
 }
Beispiel #2
0
 /// <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 static IDbParameterValue VarBinary(byte[] value, TSqlVarBinarySize size)
 {
     if (value == null)
     {
         return(new TSqlVarBinaryNullValue(size));
     }
     return(new TSqlVarBinaryValue(value, size));
 }
 public void SetUp()
 {
     _size = new TSqlVarBinarySize(100);
     _sut = new TSqlVarBinaryNullValue(_size);
 }
Beispiel #4
0
 public void SetUp()
 {
     _size = new TSqlVarBinarySize(100);
     _sut  = new TSqlVarBinaryNullValue(_size);
 }
 private static TSqlVarBinaryValue SutFactory(byte[] value, TSqlVarBinarySize size)
 {
     return new TSqlVarBinaryValue(value, size);
 }
 private static TSqlVarBinaryValue SutFactory(byte[] value, TSqlVarBinarySize size)
 {
     return(new TSqlVarBinaryValue(value, size));
 }
        public void CanBeImplicitlyConvertedFromInt32()
        {
            TSqlVarBinarySize sut = 123;

            Assert.That(sut, Is.EqualTo(SutFactory(123)));
        }
Beispiel #8
0
 /// <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 static IDbParameterValue VarBinary(byte[] value, TSqlVarBinarySize size)
 {
     if (value == null)
         return new TSqlVarBinaryNullValue(size);
     return new TSqlVarBinaryValue(value, size);
 }