/// <summary> /// Extends GetBytes so that buffer offset of 0 and call to Array.Length are not needed. /// <example> /// dbdatarecord.GetBytes(i, dataIndex, buffer); /// </example> /// </summary> public static Int64 GetBytes(this DbDataRecord dbdatarecord, Int32 i, Int64 dataIndex, Byte[] buffer) { if (dbdatarecord == null) { throw new ArgumentNullException("dbdatarecord"); } if (buffer == null) { throw new ArgumentNullException("buffer"); } return(dbdatarecord.GetBytes(i, dataIndex, buffer, 0, buffer.Length)); }
public static long GetBytes( this DbDataRecord dr, string columnName, long offset, byte[] buffer, int bufferIndex, int length) { Check.ArgNotNull(dr, nameof(dr)); int ordinal = dr.GetOrdinal(columnName); return(dr.GetBytes(ordinal, offset, buffer, bufferIndex, length)); }