Skip to content

Commit

Permalink
Merge pull request #72 from meokullu/visualization_addmethod_0001
Browse files Browse the repository at this point in the history
v2.4.0 Reporting.
  • Loading branch information
meokullu authored Mar 17, 2024
2 parents fb45c2c + 937092b commit 5c818a9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
### [2.4.0]
#### Added
* `CalcMultiThread.cs` and `CalcSingleThread.cs` files are added.
* `ClearListInDouble()`, `ClearListInLong()`, `GetCountListInDouble()` and `GetCountListInLong()` method are added under `Report.cs`.

### [2.3.0]
#### Added
Expand Down
9 changes: 9 additions & 0 deletions CalculateETA/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Style", "IDE0090:Use 'new(...)'", Justification = "<Pending>", Scope = "member", Target = "~F:CalculateETA.Report.s_etaInLongListToReport")]
[assembly: SuppressMessage("Style", "IDE0090:Use 'new(...)'", Justification = "<Pending>", Scope = "member", Target = "~F:CalculateETA.Report.s_etaInDoubleListToReport")]
38 changes: 36 additions & 2 deletions CalculateETA/src/Report.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ namespace CalculateETA
public static class Report
{
// List for calculations in double data type.
private static readonly List<double?> s_etaInDoubleListToReport = new();
private static readonly List<double?> s_etaInDoubleListToReport = new List<double?>();

// List for calculations in long data type.
private static readonly List<long?> s_etaInLongListToReport = new();
private static readonly List<long?> s_etaInLongListToReport = new List<long?>();

/// <summary>
/// Adds calculated ETA time into a list.
Expand Down Expand Up @@ -60,5 +60,39 @@ public static class Report
// Transforming filled list into an array and returns it.
return s_etaInLongListToReport.ToArray();
}

/// <summary>
/// Clear list that holds eta values in double data type.
/// </summary>
public static void ClearListInDouble()
{
s_etaInDoubleListToReport.Clear();
}

/// <summary>
/// Clear list that holds eta values in long data type.
/// </summary>
public static void ClearListInLong()
{
s_etaInLongListToReport.Clear();
}

/// <summary>
/// Get count of list in double type type.
/// </summary>
/// <returns>List count.</returns>
public static int GetCountListInDouble()
{
return s_etaInDoubleListToReport.Count;
}

/// <summary>
/// Get count of list in double type type.
/// </summary>
/// <returns>List count.</returns>
public static int GetCountListInLong()
{
return s_etaInLongListToReport.Count;
}
}
}

0 comments on commit 5c818a9

Please sign in to comment.