コード例 #1
0
ファイル: CfrCommandLine.cs プロジェクト: 386845154a/NanUI-1
        /// <summary>
        /// Returns the singleton global CfrCommandLine object. The returned object
        /// will be read-only.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_command_line_capi.h">cef/include/capi/cef_command_line_capi.h</see>.
        /// </remarks>
        public static CfrCommandLine GetGlobal()
        {
            var call = new CfxCommandLineGetGlobalRemoteCall();

            call.RequestExecution();
            return(CfrCommandLine.Wrap(new RemotePtr(call.__retval)));
        }
コード例 #2
0
        /// <summary>
        /// Returns the singleton global CfrCommandLine object. The returned object
        /// will be read-only.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_command_line_capi.h">cef/include/capi/cef_command_line_capi.h</see>.
        /// </remarks>
        public static CfrCommandLine GetGlobal()
        {
            var call = new CfxCommandLineGetGlobalRenderProcessCall();

            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(CfrCommandLine.Wrap(call.__retval));
        }
コード例 #3
0
ファイル: CfrCommandLine.cs プロジェクト: 386845154a/NanUI-1
        /// <summary>
        /// Returns a writable copy of this object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_command_line_capi.h">cef/include/capi/cef_command_line_capi.h</see>.
        /// </remarks>
        public CfrCommandLine Copy()
        {
            var call = new CfxCommandLineCopyRemoteCall();

            call.@this = RemotePtr.ptr;
            call.RequestExecution(RemotePtr.connection);
            return(CfrCommandLine.Wrap(new RemotePtr(call.__retval)));
        }
コード例 #4
0
        /// <summary>
        /// Returns the singleton global CfrCommandLine object. The returned object
        /// will be read-only.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_command_line_capi.h">cef/include/capi/cef_command_line_capi.h</see>.
        /// </remarks>
        public static CfrCommandLine GetGlobal()
        {
            var connection = CfxRemoteCallContext.CurrentContext.connection;
            var call       = new CfxCommandLineGetGlobalRemoteCall();

            call.RequestExecution(connection);
            return(CfrCommandLine.Wrap(new RemotePtr(connection, call.__retval)));
        }
コード例 #5
0
        /// <summary>
        /// Returns a writable copy of this object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_command_line_capi.h">cef/include/capi/cef_command_line_capi.h</see>.
        /// </remarks>
        public CfrCommandLine Copy()
        {
            var call = new CfxCommandLineCopyRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
            return(CfrCommandLine.Wrap(call.__retval));
        }
コード例 #6
0
        /// <summary>
        /// Returns a writable copy of this object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_command_line_capi.h">cef/include/capi/cef_command_line_capi.h</see>.
        /// </remarks>
        public CfrCommandLine Copy()
        {
            var call = new CfxCommandLineCopyRenderProcessCall();

            call.@this = proxyId;
            call.RequestExecution(this);
            return(CfrCommandLine.Wrap(call.__retval));
        }
コード例 #7
0
ファイル: CfrCommandLine.cs プロジェクト: 386845154a/NanUI-1
        internal static CfrCommandLine Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrCommandLine)weakCache.Get(remotePtr.ptr);
                if (cfrObj == null)
                {
                    cfrObj = new CfrCommandLine(remotePtr);
                    weakCache.Add(remotePtr.ptr, cfrObj);
                }
                return(cfrObj);
            }
        }
コード例 #8
0
        internal static CfrCommandLine Wrap(IntPtr proxyId)
        {
            if (proxyId == IntPtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrCommandLine)weakCache.Get(proxyId);
                if (cfrObj == null)
                {
                    cfrObj = new CfrCommandLine(proxyId);
                    weakCache.Add(proxyId, cfrObj);
                }
                return(cfrObj);
            }
        }