OutputTypeAttribute Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Specifies the types that are returned by a cmdlet, script, or function. This class is introduced in Windows PowerShell 2.0.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

System.Object
  System.Attribute
    System.Management.Automation.Internal.CmdletMetadataAttribute
      System.Management.Automation.OutputTypeAttribute

[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true)]
public sealed class OutputTypeAttribute : CmdletMetadataAttribute

NameDescription
System_CAPS_pubmethodOutputTypeAttribute(String[])

Creates a new OutputTypeAttribute object that contains the names of the types that are returned by the cmdlet, script, or function. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_pubmethodOutputTypeAttribute(Type[])

Creates a new OutputTypeAttribute object that contains an array of the .NET Framework types that are returned by the cmdlet, script, or function. This constructor is introduced by Windows PowerShell 2.0.

NameDescription
System_CAPS_pubpropertyParameterSetName

Gets and sets the parameter sets that return the types. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyProviderCmdlet

Gets and sets the provider cmdlet that returns the types specified by the attribute. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyType

Gets the types that are specified by the attribute. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

For more information about declaring this attribute, see OutputType Attribute 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.

Return to top
Show: