private static void MarshalConsumerInfo(ConsumerInfo consumerInfo, ref Sni_Consumer_Info native_consumerInfo)
{
native_consumerInfo.DefaultUserDataLength = consumerInfo.defaultBufferSize;
native_consumerInfo.fnReadComp = null != consumerInfo.readDelegate
? Marshal.GetFunctionPointerForDelegate(consumerInfo.readDelegate)
: IntPtr.Zero;
native_consumerInfo.fnWriteComp = null != consumerInfo.writeDelegate
? Marshal.GetFunctionPointerForDelegate(consumerInfo.writeDelegate)
: IntPtr.Zero;
native_consumerInfo.ConsumerKey = consumerInfo.key;
}
}