SearchExtensions: New version uploaded - Release 1.0

by John Nye

09 Oct
2014

New Release of NinjaNye.SearchExtensions

I have recently released a new version of my nuget package NinjaNye.SearchExtensions. This is a major release and as such the version has been bumped to 1.0

PM> Install-Package NinjaNye.SearchExtensions

SearchExtensions is a library of IQueryable and IEnumerable extension methods to help simplify string searching.

Changes in Release 1.0

The changes made to the latest release of Search extensions are as follows:

  • Bump version to Release 1.0
  • Remove all previously [Obsolete] methods
  • Promote the fluent Search methods out of the NinjaNye.SearchExtensions.Fluent namespace
  • Remove the specific SearchAll() method in favour of utilising .Search()
  • Performance improvements
  • Code clean and refactoring

Bump version to 1.0

SearchExtensions has been helping projects for a while now and I feel that it has matured into something that I am happy to bring out of pre-release status. With the final set of changes (detailed below), I believe it is in a fit state to be given the released status.

This does not mean that development will halt. Far from it. In future releases I hope to build the following features:

If you have any features you would like to see on the task list, please get in touch by adding a comment below or you can contact me on twitter (@ninjanye)

Remove all previously [Obsolete] methods

The development of SearchExtensions in the early days, at least, was largely a voyage of discovery especially when it came to defining the API that was exposed. Because of this, some methods were made obsolete and superseded. A good example of this was when we introduced the fluent api. Because of this there were half a dozen public methods that had been marked as [Obsolete]. These methods have now been removed. All the functionality still exists in the new fluent API which has been in place for over 6 months so I hope the use of the obsolete methods is now at a minimum.

Promote the fluent Search methods out of the NinjaNye.SearchExtensions.Fluent namespace

Previoulsy, in order to use the fluent API you would have to include the following using statement in your code.

using NinjaNye.SearchExtensions.Fluent

Since the fluent API is now the only way of initiating a search, this has now been promoted to

using NinjaNye.SearchExtensions

This should mean that it is a lot easier to start using SearchExtensions once installed.

Upgrade .Search() to search all string properties

Previously if you wanted to search all string properties you would use a second method, namely SearchAll().

As part of this latest release, we have removed the additional SearchAll method and simply updated Search() so that be default it will identify and search all string properties of an object if none are passed in.

//Search all string properties for "john"
var data.Search().Containing("john");

This new addition has been implemented across both IEnumerable and IQueryable extension methods

Performance improvements

Another inclusion of this release were performance enhancements. The improvements we have implemented mean that the difference in using SearchExtensions compared to custom linq is negligible.

A further post to explore the performance comparisons will follow

Feature requests

I'm always open to new ideas so if you have an idea for a feature that you believe would be a good addition to SearchExtensions, please get in touch.

Equally, if you are currently using SearchExtensions and can see areas that could be enhanced or improved, I'd love to hear from you.

If you would like to get in contact, please do so by adding a comment below or you can contact me on twitter (@ninjanye)

Comments 0 * Be the first to comment!

Leave a message...

28 May
2017