public static PipelineContext New(PSRuleOption option, HostContext hostContext, TargetBinder binder, OptionContext baseline, IDictionary <string, ResourceRef> unresolved) { var context = new PipelineContext(option, hostContext, binder, baseline, unresolved); CurrentThread = context; return(context); }
private PipelineContext(PSRuleOption option, HostContext hostContext, TargetBinder binder, OptionContext baseline, IDictionary <string, ResourceRef> unresolved) { Option = option; HostContext = hostContext; _LanguageMode = option.Execution.LanguageMode ?? ExecutionOption.Default.LanguageMode.Value; _NameTokenCache = new Dictionary <string, NameToken>(); LocalizedDataCache = new Dictionary <string, Hashtable>(); ExpressionCache = new Dictionary <string, object>(); ContentCache = new Dictionary <string, PSObject[]>(); Binder = binder; Baseline = baseline; _Unresolved = unresolved; }