Пример #1
0
        public async void ScriptSchemaCancel()
        {
            using (TestServiceDriverProvider testService = new TestServiceDriverProvider())
            {
                ScriptingParams requestParams = new ScriptingParams
                {
                    ScriptDestination = "ToEditor",
                    ConnectionString  = this.Northwind.ConnectionString,
                    ScriptOptions     = new ScriptOptions
                    {
                        TypeOfDataToScript = "SchemaAndData",
                    }
                };

                var result = Task.Run(() => testService.Script(requestParams));
                ScriptingProgressNotificationParams progressParams = await testService.Driver.WaitForEvent(ScriptingProgressNotificationEvent.Type, TimeSpan.FromSeconds(10));

                Task.Run(() => testService.CancelScript(progressParams.OperationId));
                ScriptingCompleteParams cancelEvent = await testService.Driver.WaitForEvent(ScriptingCompleteEvent.Type, TimeSpan.FromSeconds(10));

                Assert.True(cancelEvent.Canceled);
            }
        }
Пример #2
0
 private void SendProgressNotificationEvent(ScriptingProgressNotificationParams parameters)
 {
     this.SetCommomEventProperties(parameters);
     this.ProgressNotification?.Invoke(this, parameters);
 }
Пример #3
0
 protected override void SendProgressNotificationEvent(ScriptingProgressNotificationParams parameters)
 {
     base.SendProgressNotificationEvent(parameters);
 }
 protected virtual void SendProgressNotificationEvent(ScriptingProgressNotificationParams parameters)
 {
     this.ProgressNotification?.Invoke(this, parameters);
 }
 protected override void SendProgressNotificationEvent(ScriptingProgressNotificationParams parameters)
 {
     this.SetCommonEventProperties(parameters);
     base.SendProgressNotificationEvent(parameters);
 }