Update analyzers for .NET 10 SDK (#2611)

This commit is contained in:
Stephen Toub
2025-12-10 10:34:56 +00:00
committed by GitHub
parent 2f0b2db12a
commit b01fd23cd2
41 changed files with 382 additions and 259 deletions
@@ -41,8 +41,8 @@ public sealed class EdgeConnection : IEquatable<EdgeConnection>
/// contains duplicate values.</exception>
public static EdgeConnection CreateChecked(List<string> sourceIds, List<string> sinkIds)
{
HashSet<string> sourceSet = new(Throw.IfNull(sourceIds));
HashSet<string> sinkSet = new(Throw.IfNull(sinkIds));
HashSet<string> sourceSet = [.. Throw.IfNull(sourceIds)];
HashSet<string> sinkSet = [.. Throw.IfNull(sinkIds)];
if (sourceSet.Count != sourceIds.Count)
{
@@ -14,7 +14,7 @@ internal sealed class FanInEdgeState
public FanInEdgeState(FanInEdgeData fanInEdge)
{
this.SourceIds = fanInEdge.SourceIds.ToArray();
this.Unseen = new(this.SourceIds);
this.Unseen = [.. this.SourceIds];
this._pendingMessages = [];
}
@@ -40,7 +40,7 @@ internal sealed class FanInEdgeState
if (this.Unseen.Count == 0)
{
List<PortableMessageEnvelope> takenMessages = Interlocked.Exchange(ref this._pendingMessages, []);
this.Unseen = new(this.SourceIds);
this.Unseen = [.. this.SourceIds];
if (takenMessages.Count == 0)
{