PSCodeProperty PSCodeProperty PSCodeProperty Constructors

Definition

Overloads

PSCodeProperty(String, MethodInfo) PSCodeProperty(String, MethodInfo) PSCodeProperty(String, MethodInfo)

Initializes a new instance of the PSCodeProperty class as a read only property.

PSCodeProperty(String, MethodInfo, MethodInfo) PSCodeProperty(String, MethodInfo, MethodInfo) PSCodeProperty(String, MethodInfo, MethodInfo)

Initializes a new instance of the PSCodeProperty class. Setter or getter can be null, but both cannot be null.

PSCodeProperty(String, MethodInfo) PSCodeProperty(String, MethodInfo) PSCodeProperty(String, MethodInfo)

Initializes a new instance of the PSCodeProperty class as a read only property.

public PSCodeProperty (string name, System.Reflection.MethodInfo getterCodeReference);
new System.Management.Automation.PSCodeProperty : string * System.Reflection.MethodInfo -> System.Management.Automation.PSCodeProperty
Public Sub New (name As String, getterCodeReference As MethodInfo)
Parameters
name
String String String

name of the property

getterCodeReference
MethodInfo MethodInfo MethodInfo

This should be a public static non void method taking one PSObject parameter.

Exceptions

if name is null or empty or getterCodeReference is null

if getterCodeReference doesn't have the right format.

PSCodeProperty(String, MethodInfo, MethodInfo) PSCodeProperty(String, MethodInfo, MethodInfo) PSCodeProperty(String, MethodInfo, MethodInfo)

Initializes a new instance of the PSCodeProperty class. Setter or getter can be null, but both cannot be null.

public PSCodeProperty (string name, System.Reflection.MethodInfo getterCodeReference, System.Reflection.MethodInfo setterCodeReference);
new System.Management.Automation.PSCodeProperty : string * System.Reflection.MethodInfo * System.Reflection.MethodInfo -> System.Management.Automation.PSCodeProperty
Public Sub New (name As String, getterCodeReference As MethodInfo, setterCodeReference As MethodInfo)
Parameters
name
String String String

name of the property

getterCodeReference
MethodInfo MethodInfo MethodInfo

This should be a public static non void method taking one PSObject parameter.

setterCodeReference
MethodInfo MethodInfo MethodInfo

This should be a public static void method taking 2 parameters, where the first is an PSObject.

Exceptions

when methodForGet and methodForSet are null

if:

  • getterCodeReference doesn't have the right format,
  • setterCodeReference doesn't have the right format,
  • both getterCodeReference and setterCodeReference are null.

Applies to