-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: remove guard.net references from abstractions #462
base: main
Are you sure you want to change the base?
chore: remove guard.net references from abstractions #462
Conversation
✅ Deploy Preview for arcus-messaging canceled.
|
Guard.NotNull(applicationProperties, nameof(applicationProperties), "Requires a set of application properties to retrieve the 'traceparent' property"); | ||
if (applicationProperties is null) | ||
{ | ||
throw new ArgumentNullException(nameof(applicationProperties)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No ArgumentNullException.ThrowIfNull
?
https://learn.microsoft.com/en-us/dotnet/api/system.argumentnullexception.throwifnull?view=net-8.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked about this already: not supported in .NET STandard 2.1
@@ -21,8 +20,6 @@ public static class IServiceCollectionExtensions | |||
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="services"/> is <c>null</c>.</exception> | |||
public static MessageHandlerCollection AddMessageRouting(this IServiceCollection services) | |||
{ | |||
Guard.NotNull(services, nameof(services), "Requires a set of services to add the message routing"); | |||
|
|||
MessageHandlerCollection collection = AddMessageRouting(services, configureOptions: null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering why we remove the Guard.NotNull statement and do not replace it by any other check ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To limit references, only guard-check what you yourself need.
Remove the Guard.NET references from the abstractions libraries.
Relates to #449