Skip to content

Commit

Permalink
Upgrade to C# 12.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dixin committed Jan 27, 2024
1 parent e4434e0 commit 69d7cf5
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

public class MockErrorDetectionStrategy : ITransientErrorDetectionStrategy
{
public MockErrorDetectionStrategy()
{
this.CallCount = 0;
this.ThreadIdList = new List<int>();
}

public bool IsTransient(Exception ex)
{
this.ThreadIdList.Add(Thread.CurrentThread.ManagedThreadId);
Expand All @@ -25,7 +19,7 @@ ex switch
_ => false
};

public int CallCount { get; set; }
public int CallCount { get; set; } = 0;

public List<int> ThreadIdList { get; set; }
public List<int> ThreadIdList { get; set; } = [];
}

0 comments on commit 69d7cf5

Please sign in to comment.