This commit is contained in:
parent
49d5b6ab4f
commit
177c99de93
|
@ -28,6 +28,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
[Alias("ClassName")]
|
||||
[Parameter(Position = 0, Mandatory = true, ParameterSetName = "query")]
|
||||
[Parameter(Position = 1, ParameterSetName = "list")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -40,6 +41,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// The WMI properties to retrieve
|
||||
/// </summary>
|
||||
[Parameter(Position = 1, ParameterSetName = "query")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string[] Property
|
||||
{
|
||||
get { return (string[])_property.Clone(); }
|
||||
|
|
|
@ -4747,6 +4747,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// </summary>
|
||||
///
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string[] PSProvider
|
||||
{
|
||||
get { return _provider; }
|
||||
|
|
|
@ -132,6 +132,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// </summary>
|
||||
[Parameter(Position = 0,
|
||||
ParameterSetName = CommonRunspaceCommandBase.RunspaceNameParameterSet)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] RunspaceName
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
[Parameter(ParameterSetName = "Variable")]
|
||||
[Parameter(ParameterSetName = "Command")]
|
||||
[Parameter(ParameterSetName = "Type")]
|
||||
[ValidateNotNull]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string[] Script
|
||||
{
|
||||
get
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// An identifier for this event subscription
|
||||
/// </summary>
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = "BySource")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string SourceIdentifier
|
||||
{
|
||||
get
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// An identifier for this event subscription
|
||||
/// </summary>
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = "BySource")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string SourceIdentifier
|
||||
{
|
||||
get
|
||||
|
|
|
@ -34,6 +34,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// </summary>
|
||||
[Parameter(Position = 0,
|
||||
ParameterSetName = GetRunspaceCommand.NameParameterSet)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] Name
|
||||
{
|
||||
|
|
|
@ -258,7 +258,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// Name of the PSVariable
|
||||
/// </summary>
|
||||
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
|
||||
[ValidateNotNull]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string[] Name
|
||||
{
|
||||
get
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// </summary>
|
||||
/// <value></value>
|
||||
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string[] Name
|
||||
{
|
||||
get
|
||||
|
|
|
@ -56,6 +56,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// Gets and sets the user supplied username to be used while creating the PSCredential.
|
||||
/// </summary>
|
||||
[Parameter(Position = 0, Mandatory = false, ParameterSetName = messageSet)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string UserName
|
||||
{
|
||||
get { return _userName; }
|
||||
|
|
|
@ -2824,6 +2824,7 @@ $args[0] | foreach {{
|
|||
/// </summary>
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
[Parameter(Position = 0, Mandatory = false)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string[] Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -51,6 +51,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// Target to search for help
|
||||
/// </summary>
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -712,6 +712,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// Name(s) of PSSnapIn(s).
|
||||
/// </summary>
|
||||
[Parameter(Position = 0, Mandatory = false)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string[] Name
|
||||
{
|
||||
get
|
||||
|
|
Loading…
Reference in a new issue