/// <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(); } }
/// <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(); } } }
public override RouteMessage OnMessageReceived(ScopeEventArgs scope) { return(OnMessageReceived((CoolQScopeEventArgs)scope)); }
public BindingFailedEventArgs(ScopeEventArgs scope, BindingFailedItem failedItem) { Scope = scope; FailedItem = failedItem; }
public abstract RouteMessage OnMessageReceived(ScopeEventArgs scope);