Ignore syntax errors

This commit is contained in:
Biarity 2018-01-30 13:58:16 +10:00
parent 2d253fdf93
commit 9110203f06
3 changed files with 8 additions and 6 deletions

View File

@ -27,7 +27,8 @@ namespace Sieve.Models
{ {
get 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(' '); var tokens = _filter.Split(' ');
return tokens.Length > 1 ? tokens[1] : ""; return tokens.Length > 0 ? tokens[1] : "";
} }
} }
@ -54,7 +56,7 @@ namespace Sieve.Models
get get
{ {
var tokens = _filter.Split(operators, StringSplitOptions.RemoveEmptyEntries); var tokens = _filter.Split(operators, StringSplitOptions.RemoveEmptyEntries);
return tokens.Length > 1 ? tokens[1].Trim() : null; return tokens.Length > 0 ? tokens[1].Trim() : null;
} }
} }

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> <package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata> <metadata>
<id>Sieve</id> <id>Sieve</id>
<version>1.3.2</version> <version>1.3.4</version>
<title>Sieve</title> <title>Sieve</title>
<authors>Biarity</authors> <authors>Biarity</authors>
<owners>Biarity</owners> <owners>Biarity</owners>
@ -13,7 +13,7 @@
<description> <description>
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/ 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/
</description> </description>
<releaseNotes>Added inequality supprort</releaseNotes> <releaseNotes>Ignore syntax errors</releaseNotes>
<copyright>Copyright 2018</copyright> <copyright>Copyright 2018</copyright>
<tags>aspnetcore filter sort page paginate sieve search</tags> <tags>aspnetcore filter sort page paginate sieve search</tags>
<dependencies> <dependencies>

View File

@ -1,6 +1,6 @@
### 1. Pack: ### 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). Don't forget to change version since nuget packages are immutable (add one to the nuget current).