CefInitializeAsync Method |
Version 130.1.90
Initializes CefSharp with user-provided settings. This method allows you to wait for
OnContextInitialized to be called before continuing.
It's important to note that Initialize and Shutdown
MUST be called on your main
application thread (typically the UI thread). If you call them on different
threads, your application will hang. See the documentation for Cef.Shutdown() for more details.
Namespace: CefSharpAssembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax public static Task<bool> InitializeAsync(
CefSettingsBase settings,
bool performDependencyCheck = true,
IBrowserProcessHandler browserProcessHandler = null
)
public:
static Task<bool>^ InitializeAsync(
CefSettingsBase^ settings,
bool performDependencyCheck = true,
IBrowserProcessHandler^ browserProcessHandler = nullptr
)
Parameters
- settings CefSettingsBase
- CefSharp configuration settings.
- performDependencyCheck Boolean (Optional)
- Check that all relevant dependencies available, throws exception if any are missing
- browserProcessHandler IBrowserProcessHandler (Optional)
- The handler for functionality specific to the browser process. Null if you don't wish to handle these events
Return Value
TaskBooleanreturns a Task that can be awaited. true if successful; otherwise, false. If false check the log file for possible errors
Remarks
If successful then the Task will be completed successfully when
OnContextInitialized is called.
If successful then the continuation will happen syncrionously on the CEF UI thread.
See Also