Skip to content

Commit 22557fa

Browse files
Refactor tests and enhance documentation across files
- Adjusted assertion indentation in `PerformanceStopwatchTests`. - Removed commented-out code in `IEasyDisposableTests` and `IEasyDisposable`. - Updated `Add` method in `ObservableList` to indicate future void change. - Added future task comments in `ComputerInfo` for CPU metrics and static methods. - Enhanced documentation in `StartNewWithTelemetry` with an optional `title` parameter. - Indicated potential changes in `IDataModel` to use `string` instead of `TKey`. - Added comments for future method renames and changes in `Validator`, `ListExtensions`, `DirectoryHelper`, and `FileProcessor`. - Noted future enhancements in `HttpClientHelper` for retry logic.
1 parent 317a84f commit 22557fa

16 files changed

Lines changed: 7 additions & 176 deletions

File tree

source/Unit Tests/dotNetTips.Spargine.Core.Tests/Diagnostics/PerformanceStopwatchTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void DiagnosticsLogTest()
103103

104104
Assert.IsNotNull(psw.Diagnostics);
105105

106-
Assert.IsNotNull(psw.ToString());
106+
Assert.IsNotNull(psw.ToString());
107107
}
108108

109109
[TestMethod]

source/Unit Tests/dotNetTips.Spargine.Core.Tests/IEasyDisposableTests.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

source/dotNetTips.Spargine.8.Core/Collections/Generic/ObservableList.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e) =
204204
[Information(Status = Status.Available, UnitTestStatus = UnitTestStatus.Completed)]
205205
public virtual bool Add(T item)
206206
{
207-
// TODO: CHANGE TO VOID AT THE END OF 2025 TO WORK LIKE ADD
208-
209207
if (item is null)
210208
{
211209
return false;

source/dotNetTips.Spargine.8.Core/ComputerInfo.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ namespace DotNetTips.Spargine.Core;
3232
[Serializable]
3333
public sealed class ComputerInfo
3434
{
35-
//TODO: ADD Environment.CpuUsage * Environment.ProcessCpuUsage FROM .NET 9
36-
//TODO: CHANGE TO STATIC METHODS IN V10? MAKE SURE IT SERIALIZES OR IS AVAILBLE VIA TOSTRING!
37-
3835
/// <summary>
3936
/// Initializes a new instance of the <see cref="ComputerInfo"/> class.
4037
/// </summary>

source/dotNetTips.Spargine.8.Core/Diagnostics/PerformanceStopwatch.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,16 @@ public static PerformanceStopwatch StartNewWithAlertThreshold(TimeSpan? alertThr
320320
/// <param name="telemetry">The telemetry client used to record events and metrics.</param>
321321
/// <param name="operationName">The name of the operation being tracked.</param>
322322
/// <param name="alertThreshold">An optional threshold for performance alerts.</param>
323+
/// <param name="title">An optional title for the stopwatch instance.</param>
323324
/// <param name="message">An optional custom message to include with telemetry events.</param>
324325
/// <param name="properties">Optional key/value properties to attach to telemetry events.</param>
325-
/// <returns>A new instance of <see cref="PerformanceStopwatch"/> configured with telemetry tracking.</returns>
326+
/// <returns>
327+
/// A new instance of <see cref="PerformanceStopwatch"/> configured with telemetry tracking, alert threshold, and custom properties.
328+
/// </returns>
326329
[Information(nameof(StartNewWithTelemetry), "David McCarter", "5/8/2025", UnitTestStatus = UnitTestStatus.Completed, Status = Status.Available)]
327-
public static PerformanceStopwatch StartNewWithTelemetry(TelemetryClient telemetry, string operationName, TimeSpan? alertThreshold = null, string message = ControlChars.EmptyString, IDictionary<string, string>? properties = null)
330+
public static PerformanceStopwatch StartNewWithTelemetry(TelemetryClient telemetry, string operationName, TimeSpan? alertThreshold = null, string title = ControlChars.EmptyString, string message = ControlChars.EmptyString, IDictionary<string, string>? properties = null)
328331
{
329-
return StartNewWithAlertThreshold(alertThreshold, message).WithTelemetry(telemetry, operationName, message, properties);
332+
return StartNewWithAlertThreshold(alertThreshold, title).WithTelemetry(telemetry, operationName, message, properties);
330333
}
331334

332335
/// <summary>

source/dotNetTips.Spargine.8.Core/IDataModel.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ namespace DotNetTips.Spargine.Core;
3333
[Information(Status = Status.NeedsDocumentation)]
3434
public interface IDataModel<T, TKey> : IComparable<T>, IEquatable<T>
3535
{
36-
// TODO: REMOVE TKEY AND USE STRING SINCE IS SEEMS TO BE THE STANDARD AT THE END OF 2025.
37-
3836
/// <summary>
3937
/// Gets or sets the unique identifier for the data model.
4038
/// </summary>

source/dotNetTips.Spargine.8.Core/IEasyDisposable.cs

Lines changed: 0 additions & 106 deletions
This file was deleted.

source/dotNetTips.Spargine.8.Core/TypeHelper.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,6 @@ public static string GetTypeDisplayName([NotNull] Type type, bool fullName = tru
691691
[Information("Original code by GÉRALD BARRÉ", author: "David McCarter", createdOn: "5/20/2024", UnitTestStatus = UnitTestStatus.Completed, Status = Status.Available)]
692692
public static bool IsDotNetAssembly(FileInfo file)
693693
{
694-
//TODO: MOVE TO ASSEMBLYHELPER IN V10.
695-
696694
file = file.ArgumentExists();
697695

698696
using var stream = File.OpenRead(file.FullName);

source/dotNetTips.Spargine.8.Core/Validator.Argument.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ public static T ArgumentDefined<T>([NotNull] this T input, string errorMessage =
9898
[Information(nameof(ArgumentEquals), "David McCarter", "6/26/2017", UnitTestStatus = UnitTestStatus.Completed, BenchmarkStatus = BenchmarkStatus.NotRequired, Status = Status.Available)]
9999
public static Type ArgumentEquals([NotNull] this Type input, [NotNull] Type expectedType, string errorMessage = ControlChars.EmptyString, [CallerArgumentExpression(nameof(input))] string paramName = ControlChars.EmptyString)
100100
{
101-
//TODO: CHANGE TO ARGUMENTTYPEEQUALS IN V10
102-
103101
input = input.ArgumentNotNull();
104102
expectedType = expectedType.ArgumentNotNull();
105103

source/dotNetTips.Spargine.8.Core/Validator.Check.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ public static partial class Validator
5454
[Information(nameof(CheckEquals), "David McCarter", "1/31/2022", UnitTestStatus = UnitTestStatus.Completed, BenchmarkStatus = BenchmarkStatus.NotRequired, Status = Status.Available)]
5555
public static bool CheckEquals(this Type input, Type expectedType, in bool throwException = false, string errorMessage = ControlChars.EmptyString)
5656
{
57-
//TODO: CHANGE TO CHECKTYPEEQUALS IN V10
58-
5957
var isValid = input == expectedType;
6058

6159
if (isValid is false && throwException)

0 commit comments

Comments
 (0)