Exemple #1
0
        private void WebCore_ShuttingDown(object sender, CoreShutdownEventArgs e)
        {
            //It is possible that webcore is shutting because the window is closing
            //In this case I don't have to raise a session error
            if (Application.Current == null)
            {
                e.Cancel = true;
                return;
            }

            _IWebSessionWatcher.LogCritical("Critical: WebCore ShuttingDown!!");

            Trace.WriteLine(string.Format("MVVM for awesomium: WebCoreShutting Down exception: {0}", e.Exception));

            _IWebSessionWatcher.OnSessionError(e.Exception, () => e.Cancel = true);
        }
 public void Test_OnSessionError()
 {
     _NullWatcher.OnSessionError(new Exception(), () => { });
 }