Skip to content

Commit

Permalink
Update Polyfill_CancellationToken.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Sep 30, 2024
1 parent 821bfa7 commit c97c11a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Polyfill/Polyfill_CancellationToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static CancellationTokenRegistration Register(this CancellationToken targ
throw new ArgumentNullException(nameof(callback));
}

return target.Register((data) => callback(data, target), state, useSynchronizationContext: false);
return target.Register(data => callback(data, target), state, useSynchronizationContext: false);
}

/// <summary>Registers a delegate that will be called when this <see cref="CancellationToken">CancellationToken</see> is canceled.</summary>
Expand Down Expand Up @@ -121,7 +121,7 @@ public static CancellationTokenRegistration UnsafeRegister(this CancellationToke

try
{
Action<object> internalCallback = (data) => callback(data, target);
Action<object> internalCallback = data => callback(data, target);
return target.Register(internalCallback, state, false);
}
finally
Expand Down

0 comments on commit c97c11a

Please sign in to comment.