This topic has not yet been rated - Rate this topic

ParameterAttribute.ValueFromPipeline Property

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets and sets a Boolean value that indicates whether the parameter can take values from incoming pipeline objects.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
'Usage
Dim instance As ParameterAttribute
Dim value As Boolean

value = instance.ValueFromPipeline

instance.ValueFromPipeline = value
public bool ValueFromPipeline { get; set; }
/** @property */
public boolean get_ValueFromPipeline ()

/** @property */
public void set_ValueFromPipeline (boolean value)

public function get ValueFromPipeline () : boolean

public function set ValueFromPipeline (value : boolean)

Property Value

A Boolean value that indicates true if the parameter can take values from the incoming pipeline objects. This setting is used if the cmdlet must access the complete input object. false indicates that the parameter cannot take values from the complete input object. The default is false.

This example shows how the Parameter attribute is used to declare a parameter that accepts input from incoming pipeline objects.

[Parameter(ValueFromPipeline=true)]
public string UserName
{
  get { return userName; }
  set { userName = value; }
}
private string userName;

This property is an optional Named parameter of the Parameter attribute. For more information about the declaration syntax that is used to specify the Parameter attribute for cmdlets, see ParameterAttribute Declaration.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Did you find this helpful?
(1500 characters remaining)