修复一些错误并更新README
This commit is contained in:
@@ -8,6 +8,9 @@ using Flee.Parsing;
|
||||
|
||||
namespace Flee.PublicTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// 表达式上下文类,提供表达式编译和执行的环境
|
||||
/// </summary>
|
||||
public sealed class ExpressionContext
|
||||
{
|
||||
|
||||
@@ -186,11 +189,22 @@ namespace Flee.PublicTypes
|
||||
return this.CloneInternal(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编译动态表达式,返回类型在运行时确定
|
||||
/// </summary>
|
||||
/// <param name="expression">要编译的表达式字符串</param>
|
||||
/// <returns>编译后的动态表达式</returns>
|
||||
public IDynamicExpression CompileDynamic(string expression)
|
||||
{
|
||||
return new Flee.InternalTypes.Expression<object>(expression, this, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编译泛型表达式,返回指定类型的结果
|
||||
/// </summary>
|
||||
/// <typeparam name="TResultType">表达式结果的类型</typeparam>
|
||||
/// <param name="expression">要编译的表达式字符串</param>
|
||||
/// <returns>编译后的泛型表达式</returns>
|
||||
public IGenericExpression<TResultType> CompileGeneric<TResultType>(string expression)
|
||||
{
|
||||
return new Flee.InternalTypes.Expression<TResultType>(expression, this, true);
|
||||
|
@@ -7,7 +7,7 @@ using System.Reflection;
|
||||
namespace Flee.PublicTypes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 变量集合类,用于管理表达式中使用的变量
|
||||
/// </summary>
|
||||
public sealed class VariableCollection : IDictionary<string, object>
|
||||
{
|
||||
|
Reference in New Issue
Block a user