Use-ClassAccessors
0.1.2
The [Use-ClassAccessors][1] cmdlet updates script property of a class from the getter and setter methods.
Which are also known as [accessors or mutator methods][2].
The getter and setter methods should use the following syntax:
### getter syntax
[<type>] get_<property name>() {
return <variable>
}
or:
[Object] get_<property name>() {
retur
Which are also known as [accessors or mutator methods][2].
The getter and setter methods should use the following syntax:
### getter syntax
[<type>] get_<property name>() {
return <variable>
}
or:
[Object] get_<property name>() {
retur
The [Use-ClassAccessors][1] cmdlet updates script property of a class from the getter and setter methods.
Which are also known as [accessors or mutator methods][2].
The getter and setter methods should use the following syntax:
### getter syntax
[<type>] get_<property name>() {
return <variable>
}
or:
[Object] get_<property name>() {
return [<Type>]<variable>
}
> [!NOTE]
> Any (single) item array will be unrolled if the `[Object]` type is used for the getter method.
### setter syntax
set_<property name>(<variable>) {
<code>
}
> [!NOTE]
> A **setter** accessor requires a **getter** accessor to implement the related property.
> [!NOTE]
> In most cases, you might want to hide the getter and setter methods using the [`hidden` keyword][3]
> on the getter and setter methods.
Show more
Which are also known as [accessors or mutator methods][2].
The getter and setter methods should use the following syntax:
### getter syntax
[<type>] get_<property name>() {
return <variable>
}
or:
[Object] get_<property name>() {
return [<Type>]<variable>
}
> [!NOTE]
> Any (single) item array will be unrolled if the `[Object]` type is used for the getter method.
### setter syntax
set_<property name>(<variable>) {
<code>
}
> [!NOTE]
> A **setter** accessor requires a **getter** accessor to implement the related property.
> [!NOTE]
> In most cases, you might want to hide the getter and setter methods using the [`hidden` keyword][3]
> on the getter and setter methods.
Installation Options
Owners
Package Details
Author(s)
- Ronald Bode (iRon)
Tags
Accessors Getter Setter Class get_ set_ TypeData
Dependencies
This script has no dependencies.
FileList
- Use-ClassAccessors.nuspec
- Use-ClassAccessors.ps1