-
Notifications
You must be signed in to change notification settings - Fork 436
Expand file tree
/
Copy pathAcrSetup.cs
More file actions
42 lines (30 loc) · 1.64 KB
/
AcrSetup.cs
File metadata and controls
42 lines (30 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Azure.Mcp.Tools.Acr.Commands.Registry;
using Azure.Mcp.Tools.Acr.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Mcp.Core.Areas;
using Microsoft.Mcp.Core.Commands;
namespace Azure.Mcp.Tools.Acr;
public class AcrSetup : IAreaSetup
{
public string Name => "acr";
public string Title => "Azure Container Registry Services";
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IAcrService, AcrService>();
services.AddSingleton<RegistryListCommand>();
services.AddSingleton<RegistryRepositoryListCommand>();
}
public CommandGroup RegisterCommands(IServiceProvider serviceProvider)
{
var acr = new CommandGroup(Name, "Azure Container Registry operations - Commands for managing Azure Container Registry resources. Includes operations for listing container registries and managing registry configurations.", Title);
var registry = new CommandGroup("registry", "Container Registry resource operations - Commands for listing and managing Container Registry resources in your Azure subscription.");
acr.AddSubGroup(registry);
registry.AddCommand(serviceProvider.GetRequiredService<RegistryListCommand>());
var repository = new CommandGroup("repository", "Container Registry repository operations - Commands for listing and managing repositories within a Container Registry.");
registry.AddSubGroup(repository);
repository.AddCommand(serviceProvider.GetRequiredService<RegistryRepositoryListCommand>());
return acr;
}
}