Exemplo n.º 1
0
        public static int XmlRegisterOutputCallbacks(XmlOutputMatchCallback matchFunc, XmlOutputOpenCallback openFunc, XmlOutputWriteCallback writeFunc, XmlOutputCloseCallback closeFunc)
        {
            var __arg0 = matchFunc == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(matchFunc);
            var __arg1 = openFunc == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(openFunc);
            var __arg2 = writeFunc == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(writeFunc);
            var __arg3 = closeFunc == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(closeFunc);
            var __ret  = __Internal.XmlRegisterOutputCallbacks(__arg0, __arg1, __arg2, __arg3);

            return(__ret);
        }
Exemplo n.º 2
0
        public static XmlOutputBuffer XmlOutputBufferCreateIO(XmlOutputWriteCallback iowrite, XmlOutputCloseCallback ioclose, IntPtr ioctx, XmlCharEncodingHandler encoder)
        {
            var             __arg0 = iowrite == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(iowrite);
            var             __arg1 = ioclose == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(ioclose);
            var             __arg3 = ReferenceEquals(encoder, null) ? IntPtr.Zero : encoder.__Instance;
            var             __ret  = __Internal.XmlOutputBufferCreateIO(__arg0, __arg1, ioctx, __arg3);
            XmlOutputBuffer __result0;

            if (__ret == IntPtr.Zero)
            {
                __result0 = null;
            }
            else if (XmlOutputBuffer.NativeToManagedMap.ContainsKey(__ret))
            {
                __result0 = XmlOutputBuffer.NativeToManagedMap[__ret];
            }
            else
            {
                __result0 = XmlOutputBuffer.__CreateInstance(__ret);
            }
            return(__result0);
        }