private bool EvaluateScopedSetting(LoggingContext <string> context) { bool flag = scopeParserFactory.Evaluate(context.Value); logger.LogVerbose($"Evaluating scope {context.Value} for setting {context.Context}, result: {flag}"); return(flag); }
/// <summary> /// Handles requests for Scope.NameOfScope /// </summary> /// <param name="key">The name of the Scope to evaluate.</param> /// <returns>A True <see cref="T:Coding4Fun.VisualStudio.RemoteSettings.BoolScopeValue" /> if the Scope evaluates to True.</returns> public BoolScopeValue Provide(string key) { string scope = storage.GetScope(key); if (scope != null) { return(new BoolScopeValue(scopeParserFactory.Evaluate(scope))); } throw new ScopeParserException("Could not find scope with name: " + key); }