diff --git a/Sieve/Models/FilterTerm.cs b/Sieve/Models/FilterTerm.cs index 422787b..96bb37c 100644 --- a/Sieve/Models/FilterTerm.cs +++ b/Sieve/Models/FilterTerm.cs @@ -27,7 +27,8 @@ namespace Sieve.Models { get { - return _filter.Split(operators, StringSplitOptions.RemoveEmptyEntries)[0].Trim(); + var tokens = _filter.Split(operators, StringSplitOptions.RemoveEmptyEntries); + return tokens.Length > 0 ? tokens[0].Trim() : ""; } } @@ -44,8 +45,9 @@ namespace Sieve.Models } } + // Custom operator var tokens = _filter.Split(' '); - return tokens.Length > 1 ? tokens[1] : ""; + return tokens.Length > 0 ? tokens[1] : ""; } } @@ -54,7 +56,7 @@ namespace Sieve.Models get { var tokens = _filter.Split(operators, StringSplitOptions.RemoveEmptyEntries); - return tokens.Length > 1 ? tokens[1].Trim() : null; + return tokens.Length > 0 ? tokens[1].Trim() : null; } } diff --git a/Sieve/Sieve.nuspec b/Sieve/Sieve.nuspec index 3069e9b..5d51574 100644 --- a/Sieve/Sieve.nuspec +++ b/Sieve/Sieve.nuspec @@ -2,7 +2,7 @@ Sieve - 1.3.2 + 1.3.4 Sieve Biarity Biarity @@ -13,7 +13,7 @@ Sieve is a simple, clean, and extensible framework for .NET Core that adds sorting, filtering, and pagination functionality out of the box. Most common use case would be for serving ASP.NET Core GET queries. Documentation available on GitHub: https://github.com/Biarity/Sieve/ - Added inequality supprort + Ignore syntax errors Copyright 2018 aspnetcore filter sort page paginate sieve search diff --git a/publishing_to_nuget.md b/publishing_to_nuget.md index 772e953..42366aa 100644 --- a/publishing_to_nuget.md +++ b/publishing_to_nuget.md @@ -1,6 +1,6 @@ ### 1. Pack: ``` -dotnet pack Sieve.csproj -c Release -o . /p:PackageVersion=1.2.0 +dotnet pack Sieve.csproj -c Release -o . /p:PackageVersion=1.3.4 ``` Don't forget to change version since nuget packages are immutable (add one to the nuget current).