mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-21 20:27:47 +00:00
device properties
implemented here first because string pester tests can confirm the behavior works string pester tests for potato pass manual tests to confirm error behavior pass
This commit is contained in:
parent
b273aa7a51
commit
59f3168436
51
lib/io.ps1
51
lib/io.ps1
@ -99,53 +99,8 @@ class EqCell : IRemote {
|
||||
|
||||
class IODevice : IRemote {
|
||||
IODevice ([int]$index, [Object]$remote) : base ($index, $remote) {
|
||||
AddStringMembers -WriteOnly -PARAMS @('wdm', 'ks', 'mme')
|
||||
AddStringMembers -ReadOnly -PARAMS @('name')
|
||||
AddIntMembers -ReadOnly -PARAMS @('sr')
|
||||
}
|
||||
|
||||
hidden $_name = $($this | Add-Member ScriptProperty 'name' `
|
||||
{
|
||||
$this.Getter_String('name')
|
||||
} `
|
||||
{
|
||||
return Write-Warning ("ERROR: $($this.identifier()).name is read only")
|
||||
}
|
||||
)
|
||||
|
||||
hidden $_sr = $($this | Add-Member ScriptProperty 'sr' `
|
||||
{
|
||||
[int]$this.Getter('sr')
|
||||
} `
|
||||
{
|
||||
return Write-Warning ("ERROR: $($this.identifier()).sr is read only")
|
||||
}
|
||||
)
|
||||
|
||||
hidden $_wdm = $($this | Add-Member ScriptProperty 'wdm' `
|
||||
{
|
||||
return Write-Warning ("ERROR: $($this.identifier()).wdm is write only")
|
||||
} `
|
||||
{
|
||||
param([string]$arg)
|
||||
return $this.Setter('wdm', $arg)
|
||||
}
|
||||
)
|
||||
|
||||
hidden $_ks = $($this | Add-Member ScriptProperty 'ks' `
|
||||
{
|
||||
return Write-Warning ("ERROR: $($this.identifier()).ks is write only")
|
||||
} `
|
||||
{
|
||||
param([string]$arg)
|
||||
return $this.Setter('ks', $arg)
|
||||
}
|
||||
)
|
||||
|
||||
hidden $_mme = $($this | Add-Member ScriptProperty 'mme' `
|
||||
{
|
||||
return Write-Warning ("ERROR: $($this.identifier()).mme is write only")
|
||||
} `
|
||||
{
|
||||
param([string]$arg)
|
||||
return $this.Setter('mme', $arg)
|
||||
}
|
||||
)
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user