Esempio n. 1
0
        /// <summary>
        /// Create a new CfxXmlReader object. The returned object's functions can
        /// only be called from the thread that created the object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_xml_reader_capi.h">cef/include/capi/cef_xml_reader_capi.h</see>.
        /// </remarks>
        public static CfxXmlReader Create(CfxStreamReader stream, CfxXmlEncodingType encodingType, string uri)
        {
            var uri_pinned = new PinnedString(uri);
            var __retval   = CfxApi.cfx_xml_reader_create(CfxStreamReader.Unwrap(stream), (int)encodingType, uri_pinned.Obj.PinnedPtr, uri_pinned.Length);

            uri_pinned.Obj.Free();
            return(CfxXmlReader.Wrap(__retval));
        }
Esempio n. 2
0
        /// <summary>
        /// Create a new CfrXmlReader object. The returned object's functions can
        /// only be called from the thread that created the object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_xml_reader_capi.h">cef/include/capi/cef_xml_reader_capi.h</see>.
        /// </remarks>
        public static CfrXmlReader Create(CfrStreamReader stream, CfxXmlEncodingType encodingType, string uri)
        {
            var call = new CfxXmlReaderCreateRemoteCall();

            call.stream       = CfrObject.Unwrap(stream).ptr;
            call.encodingType = (int)encodingType;
            call.uri          = uri;
            call.RequestExecution();
            return(CfrXmlReader.Wrap(new RemotePtr(call.__retval)));
        }
Esempio n. 3
0
        /// <summary>
        /// Create a new CfrXmlReader object. The returned object's functions can
        /// only be called from the thread that created the object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_xml_reader_capi.h">cef/include/capi/cef_xml_reader_capi.h</see>.
        /// </remarks>
        public static CfrXmlReader Create(CfrStreamReader stream, CfxXmlEncodingType encodingType, string uri)
        {
            var connection = CfxRemoteCallContext.CurrentContext.connection;
            var call       = new CfxXmlReaderCreateRemoteCall();

            if (!CfrObject.CheckConnection(stream, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "stream");
            }
            call.stream       = CfrObject.Unwrap(stream).ptr;
            call.encodingType = (int)encodingType;
            call.uri          = uri;
            call.RequestExecution(connection);
            return(CfrXmlReader.Wrap(new RemotePtr(connection, call.__retval)));
        }
Esempio n. 4
0
 /// <summary>
 /// Create a new CfxXmlReader object. The returned object's functions can
 /// only be called from the thread that created the object.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_xml_reader_capi.h">cef/include/capi/cef_xml_reader_capi.h</see>.
 /// </remarks>
 public static CfxXmlReader Create(CfxStreamReader stream, CfxXmlEncodingType encodingType, string uri)
 {
     var uri_pinned = new PinnedString(uri);
     var __retval = CfxApi.cfx_xml_reader_create(CfxStreamReader.Unwrap(stream), (int)encodingType, uri_pinned.Obj.PinnedPtr, uri_pinned.Length);
     uri_pinned.Obj.Free();
     return CfxXmlReader.Wrap(__retval);
 }