コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StaticChecker"/> class.
 /// </summary>
 /// <param name="templates">Templates wihch would be checked.</param>
 public StaticChecker(Templates templates)
 {
     _templates = templates;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TemplatesTransformer"/> class.
 /// </summary>
 /// <param name="templates">Templates to transform.</param>
 public TemplatesTransformer(Templates templates)
 {
     _templates = templates;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StaticChecker"/> class.
 /// </summary>
 /// <param name="templates">The templates wihch would be checked.</param>
 public StaticChecker(Templates templates)
 {
     this.templates       = templates;
     baseExpressionParser = templates.ExpressionParser;
 }
コード例 #4
0
 private Func <IReadOnlyList <object>, object> EvaluateWithTemplates(string templateName, Templates templates)
 => (IReadOnlyList <object> args) =>
 {
     var newScope = this.ConstructScope(templateName, args.ToList(), templates.AllTemplates);
     return(templates.Evaluate(templateName, newScope));
 };
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StaticChecker"/> class.
 /// </summary>
 /// <param name="lg">the lg wihch would be checked.</param>
 public StaticChecker(Templates lg)
 {
     this.templates       = lg;
     baseExpressionParser = lg.ExpressionParser;
 }