blob: 8d11f1c863a8e0ad18e4aecf9d2c57910769f3a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
using HyperBooru.ApiClient;
using System.Management.Automation;
namespace HyperBooru.PowerShell;
[Alias("shbit")]
[Cmdlet(VerbsCommon.Set, "HyperBooruImplicitTag")]
public class SetImplicitTagCmdlet : PSCmdlet {
[Parameter(Mandatory = true)] public required HBSession Session { get; set; }
[Parameter(Mandatory = true)] public required Guid TagDefinitionId { get; set; }
[Parameter(Mandatory = true)] public required Guid[] ImplicitTagId { get; set; }
protected override void ProcessRecord() =>
Session.Tag.ReplaceImplicitTagsAsync(TagDefinitionId, ImplicitTagId)
.GetAwaiter()
.GetResult();
}
|