public async Task AddOutgoingAsync <TSupplierType>(string outgoingPrefix, TSupplierType supplierType, CancellationToken cancellationToken = default) { try { outgoingPrefix.NotNullOrWhiteSpace(nameof(outgoingPrefix)); supplierType.NotNull(nameof(supplierType)); var strSupplierType = supplierType.ConvertTo <string>(); var hashCode = outgoingPrefix.GetInvariantHashCode(); Logger.SetProperty(LogConstants.OutgoingRequestHashCode, hashCode); Logger.SetProperty(LogConstants.SupplierType, strSupplierType); var outgoingRequest = new OutgoingRequest { CreatedAt = SystemClock.DateTimeNow, HashCode = hashCode }; using (await AsyncLock.LockAsync()) await OutgoingRequestStore.AddAsync(outgoingRequest, cancellationToken); } catch (Exception ex) when(Logger.LogErrorIfNotBefore(ex, "Exception ocurred in {MethodName}", nameof(AddOutgoingAsync))) { throw; } }