Example #1
0
 public static OperationEvent Create(Guid operationId, OperationEventType type, object context = null, DateTime?dateTime = null)
 {
     return(new OperationEvent
     {
         DateTime = dateTime ?? DateTime.UtcNow,
         OperationId = operationId,
         Type = type,
         Context = context?.ToJson()
     });
 }
Example #2
0
 public async Task <bool> Exist(Guid operationId, OperationEventType type)
 {
     return(await _storage.GetDataAsync(OperationEventTableEntity.GeneratePartitionKey(operationId),
                                        OperationEventTableEntity.GenerateRowKey(type, operationId)) != null);
 }
Example #3
0
 public static string GenerateRowKey(OperationEventType type, Guid operationId)
 {
     return($"{type.ToString()}_{operationId}");
 }
 public static string GenerateRowKey(OperationEventType type)
 {
     return(type.ToString());
 }