From d36e27387eabf88845d364b9d3a2da54a583247f Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Mon, 15 Jun 2026 12:54:44 +1000 Subject: v0.18a --- SessionCmdlet.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 SessionCmdlet.cs (limited to 'SessionCmdlet.cs') diff --git a/SessionCmdlet.cs b/SessionCmdlet.cs new file mode 100644 index 0000000..d823383 --- /dev/null +++ b/SessionCmdlet.cs @@ -0,0 +1,16 @@ +using HyperBooru.ApiClient; +using System.Management.Automation; + +namespace HyperBooru.PowerShell; + +public abstract class SessionCmdlet : PSCmdlet { + [Parameter(Position = 0)] + public HBSession Session { + get => session ?? GlobalSession!; + set => session = value; + } + + internal static HBSession? GlobalSession { get; set; } + + private HBSession? session = null; +} -- cgit v1.3