Пример #1
0
 /// <summary>
 /// Event handler fired when Scope view has to be rendered
 /// </summary>
 void analyzer_RenderScope(object sender, ScopeEventArgs e)
 {
     // If the render time is longer than the time between calls of this event, skip rendering.
     if (_swScopeRender.ElapsedMilliseconds > _scopeRenderInterval)
     {
         _swScopeRender.Restart();
         RenderScopeData(e.ScopeData);
         _scopeRenderInterval  = (int)_swScopeRender.ElapsedMilliseconds + 10;
         _scopeRenderInterval += (int)(_scopeRenderInterval * 0.1); // Add 10%
         _swScopeRender.Restart();
     }
 }
Пример #2
0
        /// <summary>
        /// Just after the client applied changed, we insert datas in both client and server
        /// The first sync is not over. The deal is to know, if on next sync, those datas will
        /// be correctly synced
        /// </summary>
        private void Server_ScopeSaved(object sender, ScopeEventArgs e)
        {
            var insertRowScript =
                $@"INSERT [ServiceTickets] ([ServiceTicketID], [Title], [Description], [StatusValue], [EscalationLevel], [Opened], [Closed], [CustomerID]) 
                VALUES (newid(), N'Server insert', N'Server insert during an in progress sync', 1, 0, getdate(), NULL, 1)";

            using (var sqlConnection = new SqlConnection(fixture.ServerConnectionString))
            {
                using (var sqlCmd = new SqlCommand(insertRowScript, sqlConnection))
                {
                    sqlConnection.Open();
                    sqlCmd.ExecuteNonQuery();
                    sqlConnection.Close();
                }
            }
        }
Пример #3
0
 public override RouteMessage OnMessageReceived(ScopeEventArgs scope)
 {
     return(OnMessageReceived((CoolQScopeEventArgs)scope));
 }
Пример #4
0
 public BindingFailedEventArgs(ScopeEventArgs scope, BindingFailedItem failedItem)
 {
     Scope      = scope;
     FailedItem = failedItem;
 }
Пример #5
0
 public abstract RouteMessage OnMessageReceived(ScopeEventArgs scope);