mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-09 17:33:33 +00:00
nullable index
make index nullable so ToString can append the index for indexed objects
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
class IRemote {
|
class IRemote {
|
||||||
[int]$index
|
[Nullable[int]]$index
|
||||||
[Object]$remote
|
[Object]$remote
|
||||||
|
|
||||||
IRemote ([Object]$remote) {
|
IRemote ([Object]$remote) {
|
||||||
@@ -44,6 +44,9 @@ class IRemote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[string] ToString() {
|
[string] ToString() {
|
||||||
|
if ($this.index.HasValue) {
|
||||||
|
return $this.GetType().Name + $this.index
|
||||||
|
}
|
||||||
return $this.GetType().Name
|
return $this.GetType().Name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user