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

Made SearchOptionsProcessor and SortOptionsProcessor static classes #19

Closed
wants to merge 5 commits into from
Closed

Conversation

JudeVajira
Copy link
Contributor

Made SearchOptionsProcessor and SortOptionsProcessor static classes as there is no need to create an instance of them

if (terms.Any())
if (!terms.Any())
Copy link
Owner

Choose a reason for hiding this comment

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

@JudeVajira , I checked my master branch and line 80 is already having a negate operator. if (!terms.Any()) How did your commit has if (terms.Any()) ?

var declaredTerms = GetTermsFromModel(typeof(TModel));
var declaredTerms = GetTermsFromModel(typeof(TModel)).ToList();
Copy link
Owner

Choose a reason for hiding this comment

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

why a .ToList()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the below line of code at line 58 checks through the Enumerable each time I thought it would be best if it was using a List instead.

var declaredTerm = declaredTerms.SingleOrDefault(x => x.Name.Equals(term.Name, StringComparison.OrdinalIgnoreCase));

if (terms.Length == 0)
if (terms.Any())
Copy link
Owner

Choose a reason for hiding this comment

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

again ! is missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will fix!

@JudeVajira
Copy link
Contributor Author

I appear to have done a few mistakes. I'll redo my changes and make a new pull request. sorry for the inconvenience.

@JudeVajira JudeVajira closed this Oct 12, 2019
@fingers10
Copy link
Owner

Make sure you take latest master which now supports asp.net core 3.0. Thanks

@JudeVajira
Copy link
Contributor Author

Make sure you take latest master which now supports asp.net core 3.0. Thanks

I have made an updated pull request and suggestion regarding the usage of ASP.NET Core 3.0

Pull Request
Suggestion

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.

None yet

2 participants