mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 13:20:47 +00:00
update meta.ps1
rename $this to $obj to avoid saving over keyword.
This commit is contained in:
parent
0e11648078
commit
2775d64e47
@ -26,9 +26,6 @@ Function Setup_DLL {
|
|||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$Signature = @"
|
$Signature = @"
|
||||||
[DllImport(@"$dll")]
|
[DllImport(@"$dll")]
|
||||||
public static extern int VBVMR_Login();
|
public static extern int VBVMR_Login();
|
||||||
|
12
lib/meta.ps1
12
lib/meta.ps1
@ -1,6 +1,6 @@
|
|||||||
Function AddPublicMembers($this) {
|
Function AddPublicMembers($obj) {
|
||||||
[HashTable]$Signatures = @{}
|
[HashTable]$Signatures = @{}
|
||||||
ForEach($param in $this.bool_params) {
|
ForEach($param in $obj.bool_params) {
|
||||||
# Define getter
|
# Define getter
|
||||||
$Signatures["Getter"] = "`$this.Getter(`$this.cmd('{0}'))" -f $param
|
$Signatures["Getter"] = "`$this.Getter(`$this.cmd('{0}'))" -f $param
|
||||||
# Define setter
|
# Define setter
|
||||||
@ -10,7 +10,7 @@ Function AddPublicMembers($this) {
|
|||||||
Addmember
|
Addmember
|
||||||
}
|
}
|
||||||
|
|
||||||
ForEach($param in $this.float_params) {
|
ForEach($param in $obj.float_params) {
|
||||||
# Define getter
|
# Define getter
|
||||||
$Signatures["Getter"] = "[math]::Round(`$this.Getter(`$this.cmd('{0}')), 1)" -f $param
|
$Signatures["Getter"] = "[math]::Round(`$this.Getter(`$this.cmd('{0}')), 1)" -f $param
|
||||||
# Define setter
|
# Define setter
|
||||||
@ -20,7 +20,7 @@ Function AddPublicMembers($this) {
|
|||||||
Addmember
|
Addmember
|
||||||
}
|
}
|
||||||
|
|
||||||
ForEach($param in $this.int_params) {
|
ForEach($param in $obj.int_params) {
|
||||||
# Define getter
|
# Define getter
|
||||||
$Signatures["Getter"] = "[Int]`$this.Getter(`$this.cmd('{0}'))" -f $param
|
$Signatures["Getter"] = "[Int]`$this.Getter(`$this.cmd('{0}'))" -f $param
|
||||||
# Define setter
|
# Define setter
|
||||||
@ -30,7 +30,7 @@ Function AddPublicMembers($this) {
|
|||||||
Addmember
|
Addmember
|
||||||
}
|
}
|
||||||
|
|
||||||
ForEach($param in $this.string_params) {
|
ForEach($param in $obj.string_params) {
|
||||||
# Define getter
|
# Define getter
|
||||||
$Signatures["Getter"] = "[String]`$this.Getter_String(`$this.cmd('{0}'))" -f $param
|
$Signatures["Getter"] = "[String]`$this.Getter_String(`$this.cmd('{0}'))" -f $param
|
||||||
# Define setter
|
# Define setter
|
||||||
@ -48,5 +48,5 @@ Function Addmember{
|
|||||||
Value = [ScriptBlock]::Create($Signatures["Getter"])
|
Value = [ScriptBlock]::Create($Signatures["Getter"])
|
||||||
SecondValue = [ScriptBlock]::Create($Signatures["Setter"])
|
SecondValue = [ScriptBlock]::Create($Signatures["Setter"])
|
||||||
}
|
}
|
||||||
$this | Add-Member @AddMemberParams
|
$obj | Add-Member @AddMemberParams
|
||||||
}
|
}
|
||||||
|
@ -171,8 +171,7 @@ class Vban {
|
|||||||
|
|
||||||
class VbanInstream : Vban {
|
class VbanInstream : Vban {
|
||||||
# Constructor
|
# Constructor
|
||||||
VbanInstream ([int]$id) : base ($id)
|
VbanInstream ([int]$id) : base ($id){
|
||||||
{
|
|
||||||
$this.direction = "in"
|
$this.direction = "in"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -180,8 +179,7 @@ class VbanInstream : Vban {
|
|||||||
|
|
||||||
class VbanOutstream : Vban {
|
class VbanOutstream : Vban {
|
||||||
# Constructor
|
# Constructor
|
||||||
VbanOutstream ([int]$id) : base ($id)
|
VbanOutstream ([int]$id) : base ($id){
|
||||||
{
|
|
||||||
$this.direction = "out"
|
$this.direction = "out"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user