Skip to content

Commit 5598a54

Browse files
committed
Added documentation to the Summary record
1 parent 3d4206b commit 5598a54

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Services/Services/SummaryService.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,25 @@
66

77
namespace Services
88
{
9+
/// <summary>
10+
/// A service that is responsible for computing summaries (total profit, cost,...) of orders, portfolio entries and
11+
/// even portfolios.
12+
/// </summary>
913
public interface ISummaryService
1014
{
15+
/// <param name="AbsoluteChange">
16+
/// Absolute change of the of the tracked entity (typically in a USD, EUR,...)
17+
/// </param>
18+
/// <param name="RelativeChange">
19+
/// Relative change of the of the tracked entity (0 meaning change whatsoever, 1.0 meaning 100% increase in market value,
20+
/// -1.0) meaning -100% decrease in market value
21+
/// </param>
22+
/// <param name="MarketValue">
23+
/// Total market value of the tracked entity (entity size multiplied by the current entity value)
24+
/// </param>
25+
/// <param name="Cost">
26+
/// Cost of the tracked entity (entity size multiplied by the price of the entity at the time it was traded)
27+
/// </param>
1128
public record Summary(decimal AbsoluteChange, decimal RelativeChange, decimal MarketValue, decimal Cost);
1229

1330
public Summary GetMarketOrderSummary(MarketOrder order, decimal assetPrice);
@@ -97,6 +114,5 @@ public ISummaryService.Summary GetPortfolioEntrySummary(List<MarketOrder> portfo
97114

98115
public ISummaryService.Summary GetPortfolioSummary(List<ISummaryService.Summary> portfolioEntrySummaries) =>
99116
GetAverageOfSummaries(portfolioEntrySummaries);
100-
101117
}
102118
}

0 commit comments

Comments
 (0)