Skip to content

Commit aecd52f

Browse files
committed
Added some SummaryService.cs comments
1 parent 922f828 commit aecd52f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Services/Services/SummaryService.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,15 @@ public ISummaryService.Summary GetPortfolioEntrySummary(List<MarketOrder> portfo
111111
totalHoldingSize += order.Size * (order.Buy ? 1 : -1);
112112
// compute the value of the order
113113
var orderValue = order.Size * order.FilledPrice;
114+
114115
if (!order.Buy)
115116
{
117+
// sum all value of all sell transactions
116118
totalSellValue += orderValue;
117119
}
118120
else
119121
{
122+
// sum cost of all buy transactions
120123
totalCost += orderValue;
121124
}
122125

0 commit comments

Comments
 (0)