コード例 #1
0
        /// <summary>
        /// Feeds the result from running a remote operation back to the libmongocrypt.
        /// </summary>
        /// <param name="buffer">The buffer.</param>
        public void Feed(byte[] buffer)
        {
            unsafe
            {
                fixed(byte *p = buffer)
                {
                    IntPtr ptr = (IntPtr)p;

                    using (PinnedBinary pinned = new PinnedBinary(ptr, (uint)buffer.Length))
                    {
                        Check(Library.mongocrypt_ctx_mongo_feed(_handle, pinned.Handle));
                    }
                }
            }
        }