From 071b2b182985ccb96d72c083d8ac8e0f74ef2d45 Mon Sep 17 00:00:00 2001 From: jwaliszko Date: Thu, 18 Aug 2016 17:53:26 +0200 Subject: [PATCH] Version bump + minor cleanup and coverage fix. --- .../Properties/AssemblyInfo.cs | 4 ++-- .../Models/Query.cs | 2 +- .../Views/Home/EditorTemplates/Query.cshtml | 2 +- src/ExpressiveAnnotations/Analysis/Expr.cs | 15 --------------- .../Properties/AssemblyInfo.cs | 4 ++-- 5 files changed, 6 insertions(+), 21 deletions(-) diff --git a/src/ExpressiveAnnotations.MvcUnobtrusive/Properties/AssemblyInfo.cs b/src/ExpressiveAnnotations.MvcUnobtrusive/Properties/AssemblyInfo.cs index 69a1e90..c5f5b2b 100644 --- a/src/ExpressiveAnnotations.MvcUnobtrusive/Properties/AssemblyInfo.cs +++ b/src/ExpressiveAnnotations.MvcUnobtrusive/Properties/AssemblyInfo.cs @@ -37,5 +37,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.4.8.0")] -[assembly: AssemblyFileVersion("2.4.8.0")] +[assembly: AssemblyVersion("2.5.0.0")] +[assembly: AssemblyFileVersion("2.5.0.0")] diff --git a/src/ExpressiveAnnotations.MvcWebSample/Models/Query.cs b/src/ExpressiveAnnotations.MvcWebSample/Models/Query.cs index 0e1c036..02a8393 100644 --- a/src/ExpressiveAnnotations.MvcWebSample/Models/Query.cs +++ b/src/ExpressiveAnnotations.MvcWebSample/Models/Query.cs @@ -84,7 +84,7 @@ public Query() [RequiredIf(@"GoAbroad == true && ( (NextCountry != 'Other' && NextCountry == Country) - || (Age > 24 && Age <= 55) + || (Age > 24 && 55 >= Age) )", ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = nameof(Resources.ReasonForTravelRequired))] [RequiredIf("ArrayContains(Age, [15, 16, 17])", // alternative without array literal: ArrayContains(Age, EarlyYears)", diff --git a/src/ExpressiveAnnotations.MvcWebSample/Views/Home/EditorTemplates/Query.cshtml b/src/ExpressiveAnnotations.MvcWebSample/Views/Home/EditorTemplates/Query.cshtml index 817f093..8089a07 100644 --- a/src/ExpressiveAnnotations.MvcWebSample/Views/Home/EditorTemplates/Query.cshtml +++ b/src/ExpressiveAnnotations.MvcWebSample/Views/Home/EditorTemplates/Query.cshtml @@ -68,7 +68,7 @@ [RequiredIf(@@"GoAbroad == true && ( (NextCountry != 'Other' && NextCountry == Country) - || (Age > 24 && Age ≤ 55) + || (Age > 24 && 55 ≥ Age) )")] [RequiredIf("ArrayContains(Age, [15, 16, 17])")] @*alternative: [RequiredIf("ArrayContains(Age, EarlyYears)")]*@ [AssertThat(@@"ReasonForTravel != 'John\'s cat named ""\\\'""\n (Backslash Quote)' && ReasonForTravel != SIMONS_CAT")] diff --git a/src/ExpressiveAnnotations/Analysis/Expr.cs b/src/ExpressiveAnnotations/Analysis/Expr.cs index b047da5..f6a53e1 100644 --- a/src/ExpressiveAnnotations/Analysis/Expr.cs +++ b/src/ExpressiveAnnotations/Analysis/Expr.cs @@ -361,21 +361,6 @@ public Expression OnesComplement(Expression arg, Token oper) } } - public Expression Convert(Expression arg, Type type, Location pos) - { - if (arg.Type == typeof (bool)) - return arg; - - try - { - return Expression.Convert(arg, type); - } - catch - { - throw new ParseErrorException($"Cannot implicitly convert type '{arg.Type}' to '{type}'.", ExprString, pos); - } - } - public Expression Condition(Expression arg1, Expression arg2, Expression arg3, Token start, Token oper) { Wall.OfType(arg1, start.Location); diff --git a/src/ExpressiveAnnotations/Properties/AssemblyInfo.cs b/src/ExpressiveAnnotations/Properties/AssemblyInfo.cs index 166e6a8..43ae44e 100644 --- a/src/ExpressiveAnnotations/Properties/AssemblyInfo.cs +++ b/src/ExpressiveAnnotations/Properties/AssemblyInfo.cs @@ -42,5 +42,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.6.0.0")] -[assembly: AssemblyFileVersion("2.6.0.0")] +[assembly: AssemblyVersion("2.7.0.0")] +[assembly: AssemblyFileVersion("2.7.0.0")]