private void Register()
        {
            if (_IsInit)
            {
                return;
            }

            WpfThread = WpfThread.GetWpfThread();
            WpfThread.AddRef();
            WpfThread.Dispatcher.Invoke(DoRegister);
            WpfThread.OnThreadEnded += OnThreadEnded;
            _IsInit = true;
        }
 internal ChromiumFxWindowlessHtmlEngine(WpfThread wpfThread, Task <ChromiumFxWebView> chromiumFxWebViewTask)
 {
     _ChromiumFXWebViewTask = chromiumFxWebViewTask;
     _WpfThread             = wpfThread;
 }
예제 #3
0
 protected WindowContextProvider()
 {
     _WpfThread = WpfThread.GetWpfThread();
     _WpfThread.AddRef();
 }
예제 #4
0
 /// <summary>
 /// The constructor which takes all the DI objects
 /// </summary>
 /// <param name="logger">ILogger</param>
 /// <param name="wpfThread">WpfThread</param>
 /// <param name="wpfContext">IWpfContext</param>
 public WpfHostedService(ILogger <WpfHostedService> logger, WpfThread wpfThread, IWpfContext wpfContext)
 {
     this.logger     = logger;
     this.wpfThread  = wpfThread;
     this.wpfContext = wpfContext;
 }
 public ChromiumFXWindowLessHTMLEngineProvider(ITestHtmlProvider htmlProvider)
 {
     _HtmlProvider = htmlProvider;
     _WpfThread    = WpfThread.GetWpfThread();
     _WpfThread.AddRef();
 }
예제 #6
0
 public CefGlueWindowlessSharedJavascriptEngineFactory(ITestHtmlProvider htmlProvider)
 {
     _HtmlProvider = htmlProvider;
     _WpfThread    = WpfThread.GetWpfThread();
     _WpfThread.AddRef();
 }
 /// <summary>
 /// The constructor which takes all the DI objects
 /// </summary>
 /// <param name="logger">ILogger</param>
 /// <param name="wpfThread">WpfThread</param>
 /// <param name="wpfContext">IWpfContext</param>
 public WpfHostedService(ILogger <WpfHostedService> logger, WpfThread wpfThread, IWpfContext wpfContext)
 {
     _logger     = logger;
     _wpfThread  = wpfThread;
     _wpfContext = wpfContext;
 }
예제 #8
0
 public AwesomiumWindowlessHTMLEngineFactory()
 {
     _WpfThread = WpfThread.GetWpfThread();
     _WpfThread.AddRef();
     _EndTaskCompletionSource = new TaskCompletionSource <object>();
 }
예제 #9
0
 public WpfThreadTest()
 {
     _wpfThread = new WpfThread();
 }