diff options
Diffstat (limited to 'RemoveTagDefinition.cs')
| -rw-r--r-- | RemoveTagDefinition.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/RemoveTagDefinition.cs b/RemoveTagDefinition.cs index e28d7f9..b0d4a11 100644 --- a/RemoveTagDefinition.cs +++ b/RemoveTagDefinition.cs @@ -1,16 +1,17 @@ -using HyperBooru.ApiClient; -using System.Management.Automation; +using System.Management.Automation; namespace HyperBooru.PowerShell; [Alias("rhbtd")] [Cmdlet(VerbsCommon.Remove, "HyperBooruTagDefinition")] -public class RemoveTagDefinitionCmdlet : PSCmdlet { - [Parameter(Mandatory = true)] public required HBSession Session { get; set; } - [Parameter(Mandatory = true)] public required Guid TagDefinitionId { get; set; } +public class RemoveTagDefinitionCmdlet : SessionCmdlet { + [Parameter(Mandatory = true)] public required Guid TagDefinitionId { get; set; } - protected override void ProcessRecord() => + protected override void ProcessRecord() { Session.Tag.DeleteTagDefinitionAsync(TagDefinitionId) .GetAwaiter() .GetResult(); + + WriteVerbose($"Removed tag definition {TagDefinitionId.ToString().ToUpper()}"); + } } |
