Skip to content

Commit 52a345e

Browse files
authored
Update default ConfirmAction execution
for ConfirmAction overload with 5 params
1 parent 046befb commit 52a345e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMCmdlet.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,24 @@ protected override AzureContext DefaultContext
8585
}
8686
}
8787

88+
/// <summary>
89+
/// Guards execution of the given action using ShouldProcess and ShouldContinue. The optional
90+
/// useSHouldContinue predicate determines whether SHouldContinue should be called for this
91+
/// particular action (e.g. a resource is being overwritten). By default, both
92+
/// ShouldProcess and ShouldContinue will be executed. Cmdlets that use this method overload
93+
/// must have a force parameter.
94+
/// </summary>
95+
/// <param name="force">Do not ask for confirmation</param>
96+
/// <param name="continueMessage">Message to describe the action</param>
97+
/// <param name="processMessage">Message to prompt after the active is performed.</param>
98+
/// <param name="target">The target name.</param>
99+
/// <param name="action">The action code</param>
100+
protected override void ConfirmAction(bool force, string continueMessage, string processMessage, string target,
101+
Action action)
102+
{
103+
ConfirmAction(force, continueMessage, processMessage, target, action, () => true);
104+
}
105+
88106
/// <summary>
89107
/// Prompt for confirmation for the specified change to the specified ARM resource
90108
/// </summary>

0 commit comments

Comments
 (0)