Skip to content

Commit

Permalink
Add UsersClient in service registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tr00d committed Aug 9, 2023
1 parent 3af38e2 commit 07b7726
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Vonage.Redaction;
using Vonage.Request;
using Vonage.ShortCodes;
using Vonage.Users;
using Vonage.Verify;
using Vonage.VerifyV2;
using Vonage.Voice;
Expand Down Expand Up @@ -72,6 +73,7 @@ public static IEnumerable<object[]> GetSpecificVonageClients()
yield return new object[] {typeof(IRedactClient)};
yield return new object[] {typeof(IShortCodesClient)};
yield return new object[] {typeof(ISmsClient)};
yield return new object[] {typeof(IUsersClient)};
yield return new object[] {typeof(IVerifyClient)};
yield return new object[] {typeof(IVerifyV2Client)};
yield return new object[] {typeof(IVoiceClient)};
Expand Down
2 changes: 2 additions & 0 deletions Vonage/Extensions/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static IServiceCollection AddVonageClientScoped(this IServiceCollection s
services.AddScoped(serviceProvider => serviceProvider.GetService<VonageClient>().RedactClient);
services.AddScoped(serviceProvider => serviceProvider.GetService<VonageClient>().ShortCodesClient);
services.AddScoped(serviceProvider => serviceProvider.GetService<VonageClient>().SmsClient);
services.AddScoped(serviceProvider => serviceProvider.GetService<VonageClient>().UsersClient);
services.AddScoped(serviceProvider => serviceProvider.GetService<VonageClient>().VerifyClient);
services.AddScoped(serviceProvider => serviceProvider.GetService<VonageClient>().VerifyV2Client);
services.AddScoped(serviceProvider => serviceProvider.GetService<VonageClient>().VoiceClient);
Expand Down Expand Up @@ -58,6 +59,7 @@ public static IServiceCollection AddVonageClientTransient(this IServiceCollectio
services.AddTransient(serviceProvider => serviceProvider.GetService<VonageClient>().RedactClient);
services.AddTransient(serviceProvider => serviceProvider.GetService<VonageClient>().ShortCodesClient);
services.AddTransient(serviceProvider => serviceProvider.GetService<VonageClient>().SmsClient);
services.AddTransient(serviceProvider => serviceProvider.GetService<VonageClient>().UsersClient);
services.AddTransient(serviceProvider => serviceProvider.GetService<VonageClient>().VerifyClient);
services.AddTransient(serviceProvider => serviceProvider.GetService<VonageClient>().VerifyV2Client);
services.AddTransient(serviceProvider => serviceProvider.GetService<VonageClient>().VoiceClient);
Expand Down

0 comments on commit 07b7726

Please sign in to comment.