2024-12-13 14:50:20 -05:00
|
|
|
|
using Bit.Core.Vault.Commands;
|
|
|
|
|
|
using Bit.Core.Vault.Commands.Interfaces;
|
|
|
|
|
|
using Bit.Core.Vault.Queries;
|
2024-02-08 14:07:58 -08:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Vault;
|
|
|
|
|
|
|
|
|
|
|
|
public static class VaultServiceCollectionExtensions
|
|
|
|
|
|
{
|
|
|
|
|
|
public static IServiceCollection AddVaultServices(this IServiceCollection services)
|
|
|
|
|
|
{
|
|
|
|
|
|
services.AddVaultQueries();
|
|
|
|
|
|
|
|
|
|
|
|
return services;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static void AddVaultQueries(this IServiceCollection services)
|
|
|
|
|
|
{
|
|
|
|
|
|
services.AddScoped<IOrganizationCiphersQuery, OrganizationCiphersQuery>();
|
2024-12-12 14:27:31 -05:00
|
|
|
|
services.AddScoped<IGetTaskDetailsForUserQuery, GetTaskDetailsForUserQuery>();
|
2024-12-13 14:50:20 -05:00
|
|
|
|
services.AddScoped<IMarkTaskAsCompleteCommand, MarkTaskAsCompletedCommand>();
|
2025-01-09 12:14:24 -08:00
|
|
|
|
services.AddScoped<IGetCipherPermissionsForUserQuery, GetCipherPermissionsForUserQuery>();
|
2024-02-08 14:07:58 -08:00
|
|
|
|
}
|
|
|
|
|
|
}
|