Skip to content

Commit dcb342f

Browse files
More review fixes
1 parent 1b69f11 commit dcb342f

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

TransactionProcessor.TransactionAgrgegate/TransactionAggregate.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ public static void AddFee(this TransactionAggregate aggregate, CalculatedFee cal
103103
throw new InvalidOperationException("Unsupported Fee Type");
104104
}
105105

106-
if (@event != null)
107-
{
108-
aggregate.ApplyAndAppend(@event);
109-
}
106+
aggregate.ApplyAndAppend(@event);
110107
}
111108

112109
public static void AddProductDetails(this TransactionAggregate aggregate, Guid contractId,
@@ -160,11 +157,8 @@ public static void AddSettledFee(this TransactionAggregate aggregate, Calculated
160157
{
161158
throw new InvalidOperationException("Unsupported Fee Type");
162159
}
163-
164-
if (@event != null)
165-
{
166-
aggregate.ApplyAndAppend(@event);
167-
}
160+
161+
aggregate.ApplyAndAppend(@event);
168162
}
169163

170164
public static void AddTransactionSource(this TransactionAggregate aggregate, TransactionSource transactionSource)

TransactionProcessor.VoucherAggregate/VoucherAggregate.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ private static String GenerateVoucherCode(this VoucherAggregate aggregate, Int32
150150

151151
return rdm.Next(min, max).ToString();
152152
}
153-
154-
//private static readonly Random _random = new Random();
153+
155154
private static readonly Random rdm = new Random();
156155

157156
public static void PlayEvent(this VoucherAggregate aggregate, VoucherGeneratedEvent domainEvent)

0 commit comments

Comments
 (0)