MimeKit.Cryptography.X509CertificateDatabase.ReadBinaryBlob C# (CSharp) Method

ReadBinaryBlob() static private method

static private ReadBinaryBlob ( DbDataReader reader, int column, byte &buffer ) : int
reader DbDataReader
column int
buffer byte
return int
		static int ReadBinaryBlob (DbDataReader reader, int column, ref byte[] buffer)
		{
			long nread;

			// first, get the length of the buffer needed
			if ((nread = reader.GetBytes (column, 0, null, 0, buffer.Length)) > buffer.Length)
				Array.Resize (ref buffer, (int) nread);

			// read the certificate data
			return (int) reader.GetBytes (column, 0, buffer, 0, (int) nread);
		}