Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stijnmoreels
Copy link
Member

Remove the Guard.NET references from the abstractions libraries.

Relates to #449

Copy link

netlify bot commented Dec 27, 2024

Deploy Preview for arcus-messaging canceled.

Name Link
🔨 Latest commit 5f250c3
🔍 Latest deploy log https://app.netlify.com/sites/arcus-messaging/deploys/676e5dfd78251f000858ef6f

@stijnmoreels stijnmoreels marked this pull request as draft December 27, 2024 10:28
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));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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);
Copy link
Member

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 ?

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants