private static ParserContext SetupFalsyContext(ParserContextBehavior behavior) { ParserContext context = new ParserContext(behavior); context.Set <object>("NullValue", null); context.Set <object>("RandomObject", new object()); context.Set("EmptyString", ""); context.Set("NonEmptyString", "x"); return(context); }
public ParserContext(ParserContextBehavior behavior) { Behavior = behavior; if ((behavior & ParserContextBehavior.CaseInsensitiveVariables) == ParserContextBehavior.CaseInsensitiveVariables) { _variables = new Dictionary <string, object>(StringComparer.OrdinalIgnoreCase); _types = new Dictionary <string, Type>(StringComparer.OrdinalIgnoreCase); } else { _variables = new Dictionary <string, object>(); _types = new Dictionary <string, Type>(); } }
public CSharpContext(object rootObject, ParserContextBehavior behavior) : base(rootObject, behavior) { AddKeywords(); }
public CSharpContext(ParserContextBehavior behavior) : base(behavior) { AddKeywords(); }
private static ParserContext SetupFalsyContext(ParserContextBehavior behavior) { ParserContext context = new ParserContext(behavior); context.Set<object>("NullValue", null); context.Set<object>("RandomObject",new object()); context.Set("EmptyString", ""); context.Set("NonEmptyString", "x"); return context; }
public CSharpContext(object rootObject, IDictionary <string, object> dic, ParserContextBehavior behavior) : base(rootObject, dic, behavior) { AddKeywords(); }
public CSharpContext(object rootObject, IDictionary<string, object> dic, ParserContextBehavior behavior) : base(rootObject, dic, behavior) { AddKeywords(); }
private bool TestBehavior(ParserContextBehavior behavior) { return((Behavior & behavior) == behavior); }
public ParserContext(object rootObject, ParserContextBehavior behavior) : this(behavior) { _rootObject = rootObject; }
public ParserContext(object rootObject, IDictionary <string, object> dic, ParserContextBehavior behavior) : this(behavior) { _rootObject = rootObject; AddDictionary(dic); }
public ParserContext(IDictionary <string, object> dic, ParserContextBehavior behavior) : this(behavior) { AddDictionary(dic); }