Esempio n. 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());
 }
Esempio n. 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));
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 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);
 }
Esempio n. 6
0
 public async Task <IEnumerable <IEvent> > GetEventsAsync(long startVersion, long endVersion)
 {
     using var _ = ClaptrapMetrics.MeasureEventLoader(Identity);
     return(await _eventLoader.GetEventsAsync(startVersion, endVersion));
 }
Esempio n. 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);
 }