Esempio n. 1
0
 public void SetInt16Value(string columnName, short?value)
 {
     NullableInt16 tempvalue = value.HasValue ? new NullableInt16(value.Value) : null;
     {
         CommonPINVOKE.DataRow_SetInt16Value__SWIG_1(swigCPtr, columnName, NullableInt16.getCPtr(tempvalue));
         if (CommonPINVOKE.SWIGPendingException.Pending)
         {
             throw CommonPINVOKE.SWIGPendingException.Retrieve();
         }
     }
 }
Esempio n. 2
0
 public short?ValueAsInt16(string columnName)
 {
     global::System.IntPtr cPtr = CommonPINVOKE.DataRow_ValueAsInt16__SWIG_1(swigCPtr, columnName);
     if (CommonPINVOKE.SWIGPendingException.Pending)
     {
         throw CommonPINVOKE.SWIGPendingException.Retrieve();
     }
     using (NullableInt16 tempValue = (cPtr == global::System.IntPtr.Zero) ? null : new NullableInt16(cPtr, false)) {
         if (tempValue?.HasValue() ?? false)
         {
             return(tempValue.GetValueOrDefault());
         }
         return(null);
     }
 }
Esempio n. 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Boolean.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableBoolean.GetHashCode();
         hashCode = (hashCode * 397) ^ Byte.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableByte.GetHashCode();
         hashCode = (hashCode * 397) ^ SByte.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableSByte.GetHashCode();
         hashCode = (hashCode * 397) ^ Char.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableChar.GetHashCode();
         hashCode = (hashCode * 397) ^ Decimal.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableDecimal.GetHashCode();
         hashCode = (hashCode * 397) ^ Double.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableDouble.GetHashCode();
         hashCode = (hashCode * 397) ^ Single.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableSingle.GetHashCode();
         hashCode = (hashCode * 397) ^ Int32;
         hashCode = (hashCode * 397) ^ NullableInt32.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)UInt32;
         hashCode = (hashCode * 397) ^ NullableUInt32.GetHashCode();
         hashCode = (hashCode * 397) ^ Int64.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableInt64.GetHashCode();
         hashCode = (hashCode * 397) ^ UInt64.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableUInt64.GetHashCode();
         hashCode = (hashCode * 397) ^ Int16.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableInt16.GetHashCode();
         hashCode = (hashCode * 397) ^ UInt16.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableUInt16.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Enum;
         hashCode = (hashCode * 397) ^ NullableEnum.GetHashCode();
         hashCode = (hashCode * 397) ^ (String != null ? String.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Nested != null ? Nested.GetHashCode() : 0);
         return(hashCode);
     }
 }
Esempio n. 4
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NullableInt16 obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }