Skip to content

Commit db06bd7

Browse files
author
zzzprojects
committed
Update to v1.0.16
Update to v1.0.16
1 parent b0538d1 commit db06bd7

File tree

103 files changed

+1810
-262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1810
-262
lines changed

src/Z.Expressions.Eval/Eval/Eval.Compile.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
78

89
using System;
910
using System.Collections;

src/Z.Expressions.Eval/Eval/Eval.CompileAsync.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
8+
79

810
#if NET45
911
using System;

src/Z.Expressions.Eval/Eval/Eval.CompileAsync`.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
8+
79

810
#if NET45
911
using System.Collections.Generic;

src/Z.Expressions.Eval/Eval/Eval.Compile`.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
78

89
using System.Collections.Generic;
910

src/Z.Expressions.Eval/Eval/Eval.Execute.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
78

89
namespace Z.Expressions
910
{

src/Z.Expressions.Eval/Eval/Eval.ExecuteAsync.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
8+
79

810
#if NET45
911
using System.Threading.Tasks;

src/Z.Expressions.Eval/Eval/Eval.ExecuteAsync`.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
8+
79

810
#if NET45
911
using System.Threading.Tasks;

src/Z.Expressions.Eval/Eval/Eval.Execute`.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
78

89
namespace Z.Expressions
910
{

src/Z.Expressions.Eval/EvalCompiler/EvalCompiler.cs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
78

89
using System;
910
using System.Collections;
@@ -30,7 +31,7 @@ internal static partial class EvalCompiler
3031
/// <param name="resultType">Type of the compiled code or expression result.</param>
3132
/// <param name="parameterKind">The parameter kind for the code or expression to compile.</param>
3233
/// <returns>A TDelegate of type Func or Action that represents the compiled code or expression.</returns>
33-
internal static TDelegate Compile<TDelegate>(EvalContext context, string code, IDictionary<string, Type> parameterTypes, Type resultType, EvalCompilerParameterKind parameterKind)
34+
internal static TDelegate Compile<TDelegate>(EvalContext context, string code, IDictionary<string, Type> parameterTypes, Type resultType, EvalCompilerParameterKind parameterKind, bool forceFirstParameterProperty = false)
3435
{
3536
var cacheKey = context.UseCache ? ResolveCacheKey(context, typeof (TDelegate), code, parameterTypes) : "";
3637

@@ -58,7 +59,7 @@ internal static TDelegate Compile<TDelegate>(EvalContext context, string code, I
5859
};
5960

6061
// Resolve Parameter
61-
var parameterExpressions = ResolveParameter(scope, parameterKind, parameterTypes);
62+
var parameterExpressions = ResolveParameter(scope, parameterKind, parameterTypes, forceFirstParameterProperty);
6263

6364
// ADD global constants
6465
if (context.AliasGlobalConstants.Count > 0)
@@ -99,14 +100,14 @@ internal static TDelegate Compile<TDelegate>(EvalContext context, string code, I
99100
}
100101

101102
#if NET45
102-
/// <summary>Compile the code or expression and return a TDelegate of type Func or Action to execute.</summary>
103-
/// <typeparam name="TDelegate">Type of the delegate (Func or Action) to use to compile the code or expression.</typeparam>
104-
/// <param name="context">The eval context used to compile the code or expression.</param>
105-
/// <param name="code">The code or expression to compile.</param>
106-
/// <param name="parameterTypes">The dictionary of parameter (name / type) used in the code or expression to compile.</param>
107-
/// <param name="resultType">Type of the compiled code or expression result.</param>
108-
/// <param name="parameterKind">The parameter kind for the code or expression to compile.</param>
109-
/// <returns>A TDelegate of type Func or Action that represents the compiled code or expression.</returns>
103+
/// <summary>Compile the code or expression and return a TDelegate of type Func or Action to execute.</summary>
104+
/// <typeparam name="TDelegate">Type of the delegate (Func or Action) to use to compile the code or expression.</typeparam>
105+
/// <param name="context">The eval context used to compile the code or expression.</param>
106+
/// <param name="code">The code or expression to compile.</param>
107+
/// <param name="parameterTypes">The dictionary of parameter (name / type) used in the code or expression to compile.</param>
108+
/// <param name="resultType">Type of the compiled code or expression result.</param>
109+
/// <param name="parameterKind">The parameter kind for the code or expression to compile.</param>
110+
/// <returns>A TDelegate of type Func or Action that represents the compiled code or expression.</returns>
110111
internal static Task<TDelegate> CompileAsync<TDelegate>(EvalContext context, string code, IDictionary<string, Type> parameterTypes, Type resultType, EvalCompilerParameterKind parameterKind)
111112
{
112113
return Task.Run(() => Compile<TDelegate>(context, code, parameterTypes, resultType, parameterKind));

src/Z.Expressions.Eval/EvalCompiler/Parameter/ResolveCacheKey.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Description: C# Expression Evaluator | Evaluate, Compile and Execute C# code and expression at runtime.
2-
// Website & Documentation: https://github.com/zzzprojects/Eval-Expression.NET
3-
// Forum: https://zzzprojects.uservoice.com/forums/327759-eval-expression-net
4-
// License: http://www.zzzprojects.com/license-agreement/
2+
// Website: http://eval-expression.net/
3+
// Documentation: https://github.com/zzzprojects/Eval-Expression.NET/wiki
4+
// Forum & Issues: https://github.com/zzzprojects/Eval-Expression.NET/issues
5+
// License: https://github.com/zzzprojects/Eval-Expression.NET/blob/master/LICENSE
56
// More projects: http://www.zzzprojects.com/
6-
// Copyright (c) 2015 ZZZ Projects. All rights reserved.
7+
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
78

89
using System;
910
using System.Collections.Generic;

0 commit comments

Comments
 (0)