Skip to content

Commit e71b4f5

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: WebSocket.ThreadJob.Pop ( Fixes #98 )
1 parent c9a4eb8 commit e71b4f5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

WebSocket.types.ps1xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
<Type>
44
<Name>WebSocket.Client.ThreadJob</Name>
55
<Members>
6+
<ScriptMethod>
7+
<Name>Pop</Name>
8+
<Script>
9+
param()
10+
11+
if ($this.Output.Count -gt 0) {
12+
$this.Output[0]
13+
$this.Output.RemoveAt(0)
14+
}
15+
</Script>
16+
</ScriptMethod>
617
<ScriptMethod>
718
<Name>Send</Name>
819
<Script>
@@ -52,6 +63,17 @@ if ($message -is [Collections.IList] -and $message -isnot [byte[]]) {
5263
<Type>
5364
<Name>WebSocket.ThreadJob</Name>
5465
<Members>
66+
<ScriptMethod>
67+
<Name>Pop</Name>
68+
<Script>
69+
param()
70+
71+
if ($this.Output.Count -gt 0) {
72+
$this.Output[0]
73+
$this.Output.RemoveAt(0)
74+
}
75+
</Script>
76+
</ScriptMethod>
5577
</Members>
5678
</Type>
5779
</Types>

0 commit comments

Comments
 (0)