Skip to content

Commit 1c1d6dc

Browse files
committed
final documentation and compiler message cleanups
1 parent 5fcf7e9 commit 1c1d6dc

6 files changed

Lines changed: 43 additions & 10 deletions

File tree

TransactionTable/AccountTransactions/AccountTableHeaders.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
namespace PortfolioPerformanceTableHelper
22
{
3+
/// <summary>
4+
/// is a stringable-enum
5+
/// </summary>
36
public class AccountTableHeaders
47
{
58
private AccountTableHeaders(string name) { Name = name; }
6-
9+
/// <summary>
10+
/// returns the string representation of the enumable
11+
/// </summary>
712
public string Name { get; private set; }
813

914
/// <summary>
@@ -101,12 +106,19 @@ public class AccountTableHeaders
101106
/// </summary>
102107
public static AccountTableHeaders CashAccount => new AccountTableHeaders("Cash Account");
103108

104-
109+
/// <summary>
110+
/// returns all available AccountTableHeaders as array
111+
/// </summary>
112+
/// <returns></returns>
105113
public static AccountTableHeaders[] ToArray()
106114
{
107115
return new AccountTableHeaders[] { Date, Time,Type,WKN,ISIN,Symbol,SecurityName, ShareAmount,CurrencyGrossAmount,GrossAmount,
108116
TransactionCurrency,Value,ExchangeRate,Fees,Taxes,Note,SecuritiesAccount,OffsetAccount,CashAccount };
109117
}
118+
/// <summary>
119+
/// returns all available AccountTableHeaders as string array
120+
/// </summary>
121+
/// <returns></returns>
110122
public static string[] ToStringArray()
111123
{
112124
List<string> list = new List<string>();
@@ -116,6 +128,10 @@ public static string[] ToStringArray()
116128
}
117129
return list.ToArray();
118130
}
131+
/// <summary>
132+
/// returns the string representation of this type
133+
/// </summary>
134+
/// <returns></returns>
119135
public override string ToString()
120136
{
121137
return Name;

TransactionTable/AccountTransactions/AccountTransactionsTable.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ namespace PortfolioPerformanceTableHelper
1717
/// </remarks>
1818
public partial class AccountTransactionsTable : TransactionsTable
1919
{
20-
// Derived class specific properties, fields, and methods go here
21-
20+
/// <summary>
21+
/// creates a new AccountTransactionsTable from the base class TransactionsTable
22+
/// </summary>
23+
/// <param name="file"></param>
24+
/// <param name="splitByMonths"></param>
25+
/// <param name="keepTimeSorted"></param>
2226
public AccountTransactionsTable(FileInfo file, bool splitByMonths, bool keepTimeSorted = true)
2327
: base(file, splitByMonths, AccountTableHeaders.ToStringArray(), keepTimeSorted)
2428
{

TransactionTable/AccountTransactions/TransactionPresets/AddFee.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public partial class AccountTransactionsTable : TransactionsTable
99
/// Adds a fee transaction to the Account Transactions table.
1010
/// </summary>
1111
/// <param name="cashAccount">The cash account associated with the fee transaction.</param>
12-
/// <param name="depositDate">The date of the fee transaction.</param>
12+
/// <param name="feeDate">The date of the fee transaction.</param>
1313
/// <param name="amount">The amount of the fee transaction.</param>
1414
/// <param name="security">An optional <see cref="Objects.Security"/> object representing the security associated with the fee transaction.</param>
1515
/// <param name="note">An optional note related to the fee transaction.</param>

TransactionTable/AccountTransactions/TransactionPresets/AddInterest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void AddInterest(DateTime interestDate, DepositAccount cashAccount,
5252
{
5353
if (taxes > grossAmount)
5454
{
55-
throw new ArgumentOutOfRangeException("taxes cant be larger than interest!", nameof(taxes));
55+
throw new ArgumentOutOfRangeException(nameof(taxes), "Taxes can't be larger than interest!");
5656
}
5757
}
5858
Table table = GetTable(interestDate);

TransactionTable/PortfolioTransactions/PortfolioTableHeaders.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
namespace PortfolioPerformanceTableHelper
22
{
3+
/// <summary>
4+
/// is a string-able enum representation of the table headers
5+
/// </summary>
36
public class PortfolioTableHeaders
47
{
58
private PortfolioTableHeaders(string name) { Name = name; }
69

10+
/// <summary>
11+
/// Gets the string representation of the Table Header.
12+
/// </summary>
713
public string Name { get; private set; }
814
/// <summary>
915
/// Represents the date of the transaction. This field should contain a valid date in the format yyyy-MM-dd.
@@ -100,12 +106,19 @@ public class PortfolioTableHeaders
100106
/// </summary>
101107
public static PortfolioTableHeaders CashAccount => new PortfolioTableHeaders("Cash Account");
102108

103-
109+
/// <summary>
110+
/// returns an array of all availble Portfolio Header Objects
111+
/// </summary>
112+
/// <returns></returns>
104113
public static PortfolioTableHeaders[] ToArray()
105114
{
106115
return new PortfolioTableHeaders[] { Date, Time,Type,WKN,ISIN,Symbol,SecurityName, ShareAmount,CurrencyGrossAmount,GrossAmount,
107116
TransactionCurrency,Value,ExchangeRate,Fees,Taxes,Note,SecuritiesAccount,OffsetSecuritiesAccount,CashAccount };
108117
}
118+
/// <summary>
119+
/// returns an array of all availble Portfolio Header Object names as strings
120+
/// </summary>
121+
/// <returns></returns>
109122
public static string[] ToStringArray()
110123
{
111124
List<string> list = new List<string>();
@@ -115,6 +128,9 @@ public static string[] ToStringArray()
115128
}
116129
return list.ToArray();
117130
}
131+
/// <summary>
132+
/// Gets the string representation of the Table Header.
133+
/// </summary>
118134
public override string ToString()
119135
{
120136
return Name;

TransactionTable/PortfolioTransactions/TransactionPresets/FetchClosestSpotPrice.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using PortfolioPerformanceTableHelper.Objects;
2-
using PortfolioPerformanceTableHelper.Objects;
32
using QuickCsv.Net.Table_NS;
4-
using System.Diagnostics;
5-
using System.Reflection.Metadata.Ecma335;
63

74
namespace PortfolioPerformanceTableHelper
85
{

0 commit comments

Comments
 (0)