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

String resource is looked up eagerly for validation methods #264

Closed
campbellhardingdeason opened this issue Aug 31, 2023 · 0 comments · Fixed by #265
Closed

String resource is looked up eagerly for validation methods #264

campbellhardingdeason opened this issue Aug 31, 2023 · 0 comments · Fixed by #265

Comments

@campbellhardingdeason
Copy link
Contributor

This causes an unnecessary string resource lookup each time the indexer is called

Validation.CheckArgument(attribute.Name != CloudEventsSpecVersion.SpecVersionAttributeName, nameof(attribute), Strings.ErrorCannotIndexBySpecVersionAttribute);

Validation.CheckArgument(attribute.Name != CloudEventsSpecVersion.SpecVersionAttributeName, nameof(attribute), Strings.ErrorCannotIndexBySpecVersionAttribute);

Validation.CheckArgument(attributeName != CloudEventsSpecVersion.SpecVersionAttributeName, nameof(attributeName), Strings.ErrorCannotIndexBySpecVersionAttribute);

Validation.CheckArgument(attributeName != CloudEventsSpecVersion.SpecVersionAttributeName, nameof(attributeName), Strings.ErrorCannotIndexBySpecVersionAttribute);

jskeet added a commit to jskeet/sdk-csharp that referenced this issue Sep 4, 2023
Changes since 2.7.0:

- Prevent string resource lookup if not required. Fixes ([cloudevents#264](cloudevents#264)).
@jskeet jskeet mentioned this issue Sep 4, 2023
jskeet added a commit to jskeet/sdk-csharp that referenced this issue Sep 4, 2023
Changes since 2.7.0:

- Prevent string resource lookup if not required. Fixes ([cloudevents#264](cloudevents#264)).

Signed-off-by: Jon Skeet <jonskeet@google.com>
jskeet added a commit that referenced this issue Sep 4, 2023
Changes since 2.7.0:

- Prevent string resource lookup if not required. Fixes ([#264](#264)).

Signed-off-by: Jon Skeet <jonskeet@google.com>
ericdotnet added a commit to ericdotnet/CSharp-sdk-dev that referenced this issue May 13, 2024
Changes since 2.7.0:

- Prevent string resource lookup if not required. Fixes ([#264](cloudevents/sdk-csharp#264)).

Signed-off-by: Jon Skeet <jonskeet@google.com>
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 a pull request may close this issue.

1 participant