Пример #1
0
        /// <summary>
        /// Initialize the command line with the specified |argc| and |argv| values.
        /// The first argument must be the name of the program. This function is only
        /// supported on non-Windows platforms.
        /// </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 void InitFromArgv(int argc, RemotePtr argv)
        {
            var call = new CfxCommandLineInitFromArgvRemoteCall();

            call.@this = RemotePtr.ptr;
            call.argc  = argc;
            call.argv  = argv.ptr;
            call.RequestExecution(RemotePtr.connection);
        }
        /// <summary>
        /// Initialize the command line with the specified |argc| and |argv| values.
        /// The first argument must be the name of the program. This function is only
        /// supported on non-Windows platforms.
        /// </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 void InitFromArgv(int argc, RemotePtr argv)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxCommandLineInitFromArgvRemoteCall();

            call.@this = RemotePtr.ptr;
            call.argc  = argc;
            if (argv.connection != connection)
            {
                throw new ArgumentException("Render process connection mismatch.", "argv");
            }
            call.argv = argv.ptr;
            call.RequestExecution(connection);
        }