| Name | Message | Date |
|---|---|---|
| 📄 YouTubeCredentialsProvider.cs | 3 days ago | |
| 📄 YouTubeOptions.cs | 3 days ago | |
| 📄 YouTubeServiceCollectionExtensions.cs | 3 days ago |
📄
src/Cli/YouTubeAuth/YouTubeServiceCollectionExtensions.cs
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Slopper.Infrastructure.YouTube; namespace Slopper.Cli.YouTubeAuth; public static class YouTubeServiceCollectionExtensions { extension(IServiceCollection services) { public IServiceCollection AddYouTubeAuth() { services.AddOptions<YouTubeOptions>().BindConfiguration("YouTube").ValidateOnStart(); services.AddTransient<IValidateOptions<YouTubeOptions>, YouTubeOptionsValidator>(); services.AddSingleton<IYouTubeCredentialsProvider, YouTubeCredentialsProvider>(); return services; } } }