コード例 #1
0
ファイル: CfrZipReader.cs プロジェクト: 386845154a/NanUI-1
        /// <summary>
        /// Create a new CfrZipReader 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_zip_reader_capi.h">cef/include/capi/cef_zip_reader_capi.h</see>.
        /// </remarks>
        public static CfrZipReader Create(CfrStreamReader stream)
        {
            var call = new CfxZipReaderCreateRemoteCall();

            call.stream = CfrObject.Unwrap(stream).ptr;
            call.RequestExecution();
            return(CfrZipReader.Wrap(new RemotePtr(call.__retval)));
        }
コード例 #2
0
        /// <summary>
        /// Create a new CfrZipReader 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_zip_reader_capi.h">cef/include/capi/cef_zip_reader_capi.h</see>.
        /// </remarks>
        public static CfrZipReader Create(CfrStreamReader stream)
        {
            var connection = CfxRemoteCallContext.CurrentContext.connection;
            var call       = new CfxZipReaderCreateRemoteCall();

            if (!CfrObject.CheckConnection(stream, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "stream");
            }
            call.stream = CfrObject.Unwrap(stream).ptr;
            call.RequestExecution(connection);
            return(CfrZipReader.Wrap(new RemotePtr(connection, call.__retval)));
        }