From 58e9b4969aa9c3c6c288c30293ef3af274e23d55 Mon Sep 17 00:00:00 2001 From: Meir Blachman Date: Fri, 6 Jul 2018 06:34:45 +0300 Subject: [PATCH] Update docs for ArgumentCompleterAttribute class (#7227) --- src/System.Management.Automation/engine/Attributes.cs | 6 ++++++ .../engine/CommandCompletion/ExtensibleCompletion.cs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/System.Management.Automation/engine/Attributes.cs b/src/System.Management.Automation/engine/Attributes.cs index 29edbb2e5f..efa3d5c76f 100644 --- a/src/System.Management.Automation/engine/Attributes.cs +++ b/src/System.Management.Automation/engine/Attributes.cs @@ -1259,7 +1259,9 @@ namespace System.Management.Automation /// The text representation of the object being validated and the validating regex is passed as /// the first and second formatting parameters to the ErrorMessage formatting pattern. /// + /// /// [ValidatePattern("\s+", ErrorMessage="The text '{0}' did not pass validation of regex '{1}'")] + /// /// /// public string ErrorMessage { get; set; } @@ -1322,7 +1324,9 @@ namespace System.Management.Automation /// formatting argument. /// /// + /// /// [ValidateScript("$_ % 2", ErrorMessage = "The item '{0}' did not pass validation of script '{1}'")] + /// /// /// public string ErrorMessage { get; set; } @@ -1569,7 +1573,9 @@ namespace System.Management.Automation /// is passed as the first and second formatting argument to the ErrorMessage formatting pattern. /// /// + /// /// [ValidateSet("A","B","C", ErrorMessage="The item '{0}' is not part of the set '{1}'.") + /// /// /// public string ErrorMessage { get; set; } diff --git a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs index a50d3e3215..b6e8264b28 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs @@ -12,9 +12,11 @@ namespace System.Management.Automation /// /// This attribute is used to specify an argument completer for a parameter to a cmdlet or function. /// + /// /// [Parameter()] /// [ArgumentCompleter(typeof(NounArgumentCompleter))] /// public string Noun { get; set; } + /// /// /// [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]