Exemple #1
0
 public async Task <IState?> GetStateSnapshotAsync()
 {
     using var a = ClaptrapActivitySource.Instance
                   .StartActivity(ClaptrapActivitySource.ActivityNames.LoadState) !
                   .AddClaptrapTags(_claptrapDesign, _stateLoader.Identity);
     using var _ = ClaptrapMetrics.MeasureStateLoader(Identity);
     return(await _stateLoader.GetStateSnapshotAsync());
 }
Exemple #2
0
 public async Task <IEnumerable <IEvent> > GetEventsAsync(long startVersion, long endVersion)
 {
     using var a = ClaptrapActivitySource.Instance
                   .StartActivity(ClaptrapActivitySource.ActivityNames.LoadEvent) !
                   .AddClaptrapTags(_claptrapDesign, _eventLoader.Identity);
     using var _ = ClaptrapMetrics.MeasureEventLoader(Identity);
     return(await _eventLoader.GetEventsAsync(startVersion, endVersion));
 }
 public async Task SaveEventAsync(IEvent @event)
 {
     using var a = ClaptrapActivitySource.Instance
                   .StartActivity(ClaptrapActivitySource.ActivityNames.SaveEvent) !
                   .AddClaptrapTags(_claptrapDesign, _eventSaver.Identity);
     using var _ = ClaptrapMetrics.MeasureEventSaver(Identity);
     await _eventSaver.SaveEventAsync(@event);
 }
 public async Task SaveAsync(IState state)
 {
     // Do not save tracing save state since it is async flow.
     // If you keep it, it will make people wonder
     // using var a = ClaptrapActivitySource.Instance
     //         .StartActivity(ClaptrapActivitySource.ActivityNames.SaveState)!
     //     .AddClaptrapTags(_claptrapDesign, _stateSaver.Identity);
     using var _ = ClaptrapMetrics.MeasureStateSaver(Identity);
     await _stateSaver.SaveAsync(state);
 }
 public async Task SaveAsync(IState state)
 {
     using var _ = ClaptrapMetrics.MeasureStateSaver(Identity);
     await _stateSaver.SaveAsync(state);
 }
Exemple #6
0
 public async Task <IEnumerable <IEvent> > GetEventsAsync(long startVersion, long endVersion)
 {
     using var _ = ClaptrapMetrics.MeasureEventLoader(Identity);
     return(await _eventLoader.GetEventsAsync(startVersion, endVersion));
 }
Exemple #7
0
 public async Task <IState?> GetStateSnapshotAsync()
 {
     using var _ = ClaptrapMetrics.MeasureStateLoader(Identity);
     return(await _stateLoader.GetStateSnapshotAsync());
 }
 public async Task SaveEventAsync(IEvent @event)
 {
     using var _ = ClaptrapMetrics.MeasureEventSaver(Identity);
     await _eventSaver.SaveEventAsync(@event);
 }