public static object GetSafeValue(Ast ast, ExecutionContext context, SafeValueContext safeValueContext) { s_context = context; if (IsSafeValueVisitor.IsAstSafe(ast, safeValueContext)) { return(ast.Accept(new GetSafeValueVisitor())); } if (safeValueContext == SafeValueContext.ModuleAnalysis) { return(null); } throw PSTraceSource.NewArgumentException("ast"); }
public static object GetSafeValue(Ast ast, ExecutionContext context, SafeValueContext safeValueContext) { t_context = context; if (safeValueContext == SafeValueContext.SkipHashtableSizeCheck || IsSafeValueVisitor.IsAstSafe(ast, safeValueContext)) { return(ast.Accept(new GetSafeValueVisitor())); } if (safeValueContext == SafeValueContext.ModuleAnalysis) { return(null); } throw PSTraceSource.NewArgumentException(nameof(ast)); }
public static object GetSafeValue(Ast ast, ExecutionContext context, SafeValueContext safeValueContext) { s_context = context; if (IsSafeValueVisitor.IsAstSafe(ast, safeValueContext)) { return ast.Accept(new GetSafeValueVisitor()); } if (safeValueContext == SafeValueContext.ModuleAnalysis) { return null; } throw PSTraceSource.NewArgumentException("ast"); }