PSScriptProperty PSScriptProperty PSScriptProperty Class

Definition

Serves as a property implemented with getter and setter scripts.

public class PSScriptProperty : System.Management.Automation.PSPropertyInfo
type PSScriptProperty = class
    inherit PSPropertyInfo
Public Class PSScriptProperty
Inherits PSPropertyInfo
Inheritance

Remarks

It is permitted to subclass PSScriptProperty but there is no established scenario for doing this, nor has it been tested.

Constructors

PSScriptProperty(String, ScriptBlock) PSScriptProperty(String, ScriptBlock) PSScriptProperty(String, ScriptBlock)

Initializes an instance of the PSScriptProperty class as a read only property.

PSScriptProperty(String, ScriptBlock, ScriptBlock) PSScriptProperty(String, ScriptBlock, ScriptBlock) PSScriptProperty(String, ScriptBlock, ScriptBlock)

Initializes an instance of the PSScriptProperty class as a read only property. getterScript or setterScript can be null, but not both.

Properties

GetterScript GetterScript GetterScript

Gets the script used for the property getter. It might be null.

IsGettable IsGettable IsGettable

Gets true if this property can be read

IsInstance IsInstance IsInstance Inherited from PSMemberInfo
IsSettable IsSettable IsSettable

Gets true if this property can be set

MemberType MemberType MemberType

Gets the member type

Name Name Name Inherited from PSMemberInfo
SetterScript SetterScript SetterScript

Gets the script used for the property setter. It might be null.

TypeNameOfValue TypeNameOfValue TypeNameOfValue

Gets the type of the value for this member. Currently this always returns typeof(object).FullName.

Value Value Value

Gets and Sets the value of this property

Methods

Copy() Copy() Copy()

returns a new PSMemberInfo that is a copy of this PSMemberInfo

SetMemberName(String) SetMemberName(String) SetMemberName(String) Inherited from PSMemberInfo
ToString() ToString() ToString()

Returns the string representation of this property

Applies to