Beispiel #1
0
 /// <summary>
 /// 以父VariableScope与字典来初始化对象
 /// </summary>
 /// <param name="parent">父VariableScope</param>
 public VariableScope(VariableScope parent)
 {
     this.parent = parent;
     this.dic    = new Dictionary <string, VariableElement>(Runtime.Store.ComparerIgnoreCase);
 }
Beispiel #2
0
 /// <summary>
 /// 引擎配置
 /// </summary>
 /// <param name="conf">配置内容</param>
 /// <param name="scope">初始数据</param>
 internal static void Configure(IDictionary <string, string> conf, VariableScope scope)
 {
     Store.Data = (scope == null || scope.Count == 0) ? null : scope;
     Store.Initialization(conf);
 }
Beispiel #3
0
 /// <summary>
 /// 引擎配置
 /// </summary>
 /// <param name="conf">配置内容</param>
 /// <param name="scope">初始数据</param>
 public static void Configure(IDictionary <string, string> conf, VariableScope scope)
 {
     Runtime.Configure(conf, scope);
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VariableScope"/> class
 /// </summary>
 /// <param name="parent">The parent <see cref="VariableScope"/>.</param>
 /// <param name="pattern">The <see cref="TypeDetect"/>.</param>
 public VariableScope(VariableScope parent, TypeDetect pattern)
 {
     this.parent        = parent;
     this.dic           = new Dictionary <string, VariableElement>(StringComparer.OrdinalIgnoreCase);
     this.DetectPattern = pattern;
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VariableScope"/> class
 /// </summary>
 /// <param name="parent">The parent <see cref="VariableScope"/>.</param>
 public VariableScope(VariableScope parent)
     : this(parent, parent?.DetectPattern ?? TypeDetect.Standard)
 {
 }
 /// <summary>
 /// ContextBase
 /// </summary>
 public ContextBase()
 {
     variableScope = new VariableScope();
 }