Skip to content

Commit a7e82af

Browse files
authored
Fix broken build on .NET SDK v10.0.200 (#1950)
1 parent 21cc6e2 commit a7e82af

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/Examples/DapperExample/TranslationToSql/Transformations/UnusedSelectorsRewriter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ internal sealed partial class UnusedSelectorsRewriter : SqlTreeNodeVisitor<ISet<
3030
{
3131
private readonly ColumnSelectorUsageCollector _usageCollector;
3232
private readonly ILogger<UnusedSelectorsRewriter> _logger;
33+
#pragma warning disable IDE0370 // Suppression is unnecessary
34+
// Justification: Workaround for bug at https://github.com/dotnet/roslyn/issues/81843.
3335
private SelectNode _rootSelect = null!;
36+
#pragma warning restore IDE0370 // Suppression is unnecessary
3437
private bool _hasChanged;
3538

3639
public UnusedSelectorsRewriter(ILoggerFactory loggerFactory)

src/JsonApiDotNetCore/AtomicOperations/Processors/DeleteProcessor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ public DeleteProcessor(IDeleteService<TResource, TId> service)
2424
ArgumentNullException.ThrowIfNull(operation);
2525

2626
var id = (TId)operation.Resource.GetTypedId();
27-
await _service.DeleteAsync(id!, cancellationToken);
27+
#pragma warning disable CS8607 // A possible null value may not be used for a type marked with [NotNull] or [DisallowNull]
28+
// Justification: Temporary workaround for R# bug at https://youtrack.jetbrains.com/issue/RSRP-503026.
29+
await _service.DeleteAsync(id, cancellationToken);
30+
#pragma warning restore CS8607 // A possible null value may not be used for a type marked with [NotNull] or [DisallowNull]
2831

2932
return null;
3033
}

src/JsonApiDotNetCore/Diagnostics/CodeTimingSessionManager.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ private static void AssertNoActiveSession()
8989

9090
private static void SessionOnDisposed(object? sender, EventArgs args)
9191
{
92-
if (_session != null)
93-
{
94-
_session.Disposed -= SessionOnDisposed;
95-
_session = null;
96-
}
92+
_session?.Disposed -= SessionOnDisposed;
93+
_session = null;
9794
}
9895
}

0 commit comments

Comments
 (0)