private ActionPreference QueryForAction(
            RuntimeException rte,
            string message,
            ExecutionContext context)
        {
            ActionPreference enumPreference = context.GetEnumPreference <ActionPreference>(InitialSessionState.errorActionPreferenceVariablePath, ActionPreference.Continue, out bool _);

            return(enumPreference != ActionPreference.Inquire || rte.SuppressPromptInInterpreter ? enumPreference : this.InquireForActionPreference(message, context));
        }
Example #2
0
        internal static ActionPreference QueryForAction(RuntimeException rte, string message, ExecutionContext context)
        {
            bool             flag;
            ActionPreference preference = context.GetEnumPreference <ActionPreference>(SpecialVariables.ErrorActionPreferenceVarPath, ActionPreference.Continue, out flag);

            if ((preference == ActionPreference.Inquire) && !rte.SuppressPromptInInterpreter)
            {
                return(InquireForActionPreference(message, context));
            }
            return(preference);
        }