mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 05:10:48 +00:00
add Login() to Remote class.
method chain it in factory functions.
This commit is contained in:
parent
828a9a5731
commit
150301c271
@ -11,13 +11,17 @@ class Remote {
|
|||||||
}
|
}
|
||||||
$this.kind = GetKind($kindId)
|
$this.kind = GetKind($kindId)
|
||||||
$this.profiles = Get_Profiles($this.kind.name)
|
$this.profiles = Get_Profiles($this.kind.name)
|
||||||
Login -KIND $this.kind.name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[string] ToString() {
|
[string] ToString() {
|
||||||
return "Voicemeeter " + $this.kind.name.substring(0, 1).toupper() + $this.kind.name.substring(1)
|
return "Voicemeeter " + $this.kind.name.substring(0, 1).toupper() + $this.kind.name.substring(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Remote] Login() {
|
||||||
|
Login -kindId $this.kind.name
|
||||||
|
return $this
|
||||||
|
}
|
||||||
|
|
||||||
[void] Logout() {
|
[void] Logout() {
|
||||||
Logout
|
Logout
|
||||||
}
|
}
|
||||||
@ -112,15 +116,15 @@ class RemotePotato : Remote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Function Get-RemoteBasic {
|
Function Get-RemoteBasic {
|
||||||
[RemoteBasic]::new()
|
[RemoteBasic]::new().Login()
|
||||||
}
|
}
|
||||||
|
|
||||||
Function Get-RemoteBanana {
|
Function Get-RemoteBanana {
|
||||||
[RemoteBanana]::new()
|
[RemoteBanana]::new().Login()
|
||||||
}
|
}
|
||||||
|
|
||||||
Function Get-RemotePotato {
|
Function Get-RemotePotato {
|
||||||
[RemotePotato]::new()
|
[RemotePotato]::new().Login()
|
||||||
}
|
}
|
||||||
|
|
||||||
Function Connect-Voicemeeter {
|
Function Connect-Voicemeeter {
|
||||||
|
Loading…
Reference in New Issue
Block a user