Skip to content

Commit

Permalink
Merge pull request #151 from codingseb/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
codingseb authored Aug 26, 2022
2 parents c2201bb + cc08607 commit 1f7b896
Show file tree
Hide file tree
Showing 16 changed files with 239 additions and 524 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# CS1591:
dotnet_diagnostic.CS1591.severity = none
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<Company>Coding Seb</Company>
<Product>CodingSeb.ExpressionEvaluator.Tests</Product>
<Copyright>Copyright © Coding Seb 2018</Copyright>
<TargetFrameworks>net47;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net47</TargetFrameworks>
<UserSecretsId>c4ac27fa-8b9c-4784-a284-7a9a06320537</UserSecretsId>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
Expand Down
13 changes: 13 additions & 0 deletions CodingSeb.ExpressionEvaluator.Tests/ExpressionEvaluatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace CodingSeb.ExpressionEvaluator.Tests
{
[TestFixture]
[DefaultFloatingPointTolerance(0.00001)]
public class ExpressionEvaluatorTests
{
#region Type testing
Expand Down Expand Up @@ -1837,6 +1838,18 @@ public void Evaluate_DoubleDoubleQuotesInEscapedStringThrowException()
evaluator.Evaluate("@\"Hello \"\" Joe\"").ShouldBe(@"Hello "" Joe");
}

//[Test]
//[Category("Bug")]
//[Category("#135")]
//public void Evaluate_MultiLevelPropertyAccessAfterConditionalAndBeforeDoubleEquals()
//{
// ExpressionEvaluator ee = new ExpressionEvaluator();

// ee.Variables["A"] = new Dictionary<string, FileStream>();

// ee.Evaluate<bool>("A.TryGetValue(\"NotExist\", out FileStream fs) && fs.SafeFileHandle.IsClosed == true").ShouldBe<bool>(false);
//}

#endregion

#region EvaluateWithSpecificEvaluator
Expand Down
20 changes: 12 additions & 8 deletions CodingSeb.ExpressionEvaluator.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28729.10
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodingSeb.ExpressionEvaluator", "CodingSeb.ExpressionEvaluator\CodingSeb.ExpressionEvaluator.csproj", "{21F19149-EED6-4856-AB9A-701C41F86F66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodingSeb.ExpressionEvaluator.Tests", "CodingSeb.ExpressionEvaluator.Tests\CodingSeb.ExpressionEvaluator.Tests.csproj", "{8794CB3B-EAB2-411D-B912-7AD3425D6C62}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TryWindow", "TryWindow\TryWindow.csproj", "{8BB2AC61-77C6-42B9-82E3-44C88F29FD4E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TryWindow", "TryWindow\TryWindow.csproj", "{D699FC0D-BE4C-4CDD-864F-E4C7821E1A21}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{402E2A75-2113-4744-8251-02E8C6A60BC8}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -23,10 +27,10 @@ Global
{8794CB3B-EAB2-411D-B912-7AD3425D6C62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8794CB3B-EAB2-411D-B912-7AD3425D6C62}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8794CB3B-EAB2-411D-B912-7AD3425D6C62}.Release|Any CPU.Build.0 = Release|Any CPU
{8BB2AC61-77C6-42B9-82E3-44C88F29FD4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8BB2AC61-77C6-42B9-82E3-44C88F29FD4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BB2AC61-77C6-42B9-82E3-44C88F29FD4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BB2AC61-77C6-42B9-82E3-44C88F29FD4E}.Release|Any CPU.Build.0 = Release|Any CPU
{D699FC0D-BE4C-4CDD-864F-E4C7821E1A21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D699FC0D-BE4C-4CDD-864F-E4C7821E1A21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D699FC0D-BE4C-4CDD-864F-E4C7821E1A21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D699FC0D-BE4C-4CDD-864F-E4C7821E1A21}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
19 changes: 8 additions & 11 deletions CodingSeb.ExpressionEvaluator/CodingSeb.ExpressionEvaluator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,23 @@
<Product>CodingSeb.ExpressionEvaluator</Product>
<Description>A Simple Math and Pseudo C# Expression Evaluator in One C# File. Can also execute small C# like scripts</Description>
<Copyright>Copyright © Coding Seb 2017</Copyright>
<Version>1.4.38.0</Version>
<AssemblyVersion>1.4.38.0</AssemblyVersion>
<FileVersion>1.4.38.0</FileVersion>
<Version>1.4.39.0</Version>
<AssemblyVersion>1.4.39.0</AssemblyVersion>
<FileVersion>1.4.39.0</FileVersion>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Authors>Coding Seb</Authors>
<PackageId>CodingSeb.ExpressionEvaluator</PackageId>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/codingseb/ExpressionEvaluator</PackageProjectUrl>
<PackageTags>expression-evaluator evaluation math expression evaluate parser mathematical-expressions-evaluator mathematical-expressions script scripting evaluator csharp-script eval execute executescript evaluate-expressions expression-parser fluid calculations formula netcore netstandard net45 interpreter</PackageTags>
<TargetFrameworks>net47;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Nullable>disable</Nullable>
<PackageIconUrl>https://github.com/codingseb/ExpressionEvaluator/blob/master/Icon.png?raw=true</PackageIconUrl>
<PackageIcon>Icon.png</PackageIcon>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReleaseNotes>* OptionInlineNamespacesEvaluationActive become OptionInlineNamespacesEvaluationRule and allow more possibilities with the addition of InlineNamespacesList
This option can now be one of those :
- InlineNamespacesEvaluationRule.AllowAll
- InlineNamespacesEvaluationRule.AllowOnlyInlineNamespacesList
- InlineNamespacesEvaluationRule.BlockOnlyInlineNamespacesList
- InlineNamespacesEvaluationRule.BlockAll
* Throw better exception and get better exception context with ExceptionDispatchInfo on TargetInvocationException.InnerException and BubbleExceptionContainer</PackageReleaseNotes>
<PackageReleaseNotes>* net45 target is now net462 because (net45 is not supported anymore)
* Match function arguments considering implicit casts</PackageReleaseNotes>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<RepositoryUrl>https://github.com/codingseb/ExpressionEvaluator</RepositoryUrl>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -47,6 +43,7 @@
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
<None Include="..\Icon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
Expand Down
Loading

0 comments on commit 1f7b896

Please sign in to comment.