private async ValueTask PublishPersisientEventAsync(UsageRecord usageRecord, UsageRecordsChangeEventKind eventKind)
 {
     if (_bus is not DumyBus)
     {
         await _bus.PubSub.PublishAsync <UsageRecordPersisientEventArgs>(
             new(usageRecord, eventKind))
         .ContinueWith(task => { if (task.IsFaulted && task.Exception != null)
                                 {
                                     throw task.Exception;
                                 }
                       });
     }
 }
示例#2
0
 public UsageRecordPersisientEventArgs(UsageRecord usageRecord, UsageRecordsChangeEventKind eventKind)
 {
     EventKind   = eventKind;
     UsageRecord = usageRecord;
 }