feat: scaffold P_Rec_Annot .NET 8 architecture
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using PRecAnnot.Application;
|
||||
|
||||
namespace PRecAnnot.UI;
|
||||
|
||||
public sealed class RibbonRegistration
|
||||
{
|
||||
private readonly HashSet<string> _registered = new(StringComparer.OrdinalIgnoreCase);
|
||||
public bool Register(CommandRegistry registry)
|
||||
{
|
||||
var changed = false;
|
||||
foreach (var item in registry.Commands)
|
||||
changed |= _registered.Add($"{item.RibbonPanel}:{item.CommandName}");
|
||||
return changed;
|
||||
}
|
||||
public void Unregister(CommandRegistry registry) { foreach (var item in registry.Commands) _registered.Remove($"{item.RibbonPanel}:{item.CommandName}"); }
|
||||
public int RegisteredCount => _registered.Count;
|
||||
}
|
||||
Reference in New Issue
Block a user