mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 21:30:46 +00:00
Update vban.ps1
move $this.id into base class remove unnecessary assignment
This commit is contained in:
parent
c31f169b0b
commit
0e11648078
12
lib/vban.ps1
12
lib/vban.ps1
@ -4,8 +4,9 @@ class Vban {
|
|||||||
[Array]$stringparams
|
[Array]$stringparams
|
||||||
|
|
||||||
# Constructor
|
# Constructor
|
||||||
Vban()
|
Vban($id)
|
||||||
{
|
{
|
||||||
|
$this.id = $id
|
||||||
$this.stringparams = @('name', 'ip')
|
$this.stringparams = @('name', 'ip')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,9 +171,8 @@ class Vban {
|
|||||||
|
|
||||||
class VbanInstream : Vban {
|
class VbanInstream : Vban {
|
||||||
# Constructor
|
# Constructor
|
||||||
VbanInstream ($id)
|
VbanInstream ([int]$id) : base ($id)
|
||||||
{
|
{
|
||||||
$this.id = $id
|
|
||||||
$this.direction = "in"
|
$this.direction = "in"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -180,9 +180,8 @@ class VbanInstream : Vban {
|
|||||||
|
|
||||||
class VbanOutstream : Vban {
|
class VbanOutstream : Vban {
|
||||||
# Constructor
|
# Constructor
|
||||||
VbanOutstream ($id)
|
VbanOutstream ([int]$id) : base ($id)
|
||||||
{
|
{
|
||||||
$this.id = $id
|
|
||||||
$this.direction = "out"
|
$this.direction = "out"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,9 +197,8 @@ Function Vban {
|
|||||||
[void]$outstream.Add([VbanOutstream]::new($_))
|
[void]$outstream.Add([VbanOutstream]::new($_))
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = [PSCustomObject]@{
|
[PSCustomObject]@{
|
||||||
instream = $instream
|
instream = $instream
|
||||||
outstream = $outstream
|
outstream = $outstream
|
||||||
}
|
}
|
||||||
return $obj
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user