add azure comm
This commit is contained in:
		
							parent
							
								
									491f87f106
								
							
						
					
					
						commit
						dee870c7bb
					
				| @ -1,4 +1,7 @@ | ||||
| using System.Security.Principal; | ||||
| using Azure.Communication.CallAutomation; | ||||
| using Azure.Communication.Identity; | ||||
| using Azure.Communication.Rooms; | ||||
| using Coravel; | ||||
| using EnotaryoPH.Data; | ||||
| using EnotaryoPH.Web.Common.Hubs; | ||||
| @ -55,6 +58,28 @@ namespace EnotaryoPH.Web | ||||
|             builder.Services.AddQueue(); | ||||
|             builder.Services.AddMailer(config); | ||||
|             builder.Services.AddTransient<SignatoryInvitationInvocable>(); | ||||
|             builder.Services.AddTransient<IConferenceSheduleService, ConferenceSheduleService>(); | ||||
|             builder.Services.AddScoped<RoomsClient>(provider => | ||||
|             { | ||||
|                 var connectionString = config.GetConnectionString("AzureCommunication"); | ||||
|                 return string.IsNullOrEmpty(connectionString) | ||||
|                     ? throw new InvalidConfigurationException("AzureCommunication", string.Empty) | ||||
|                     : new RoomsClient(connectionString); | ||||
|             }); | ||||
|             builder.Services.AddScoped<CommunicationIdentityClient>(provider => | ||||
|             { | ||||
|                 var connectionString = config.GetConnectionString("AzureCommunication"); | ||||
|                 return string.IsNullOrEmpty(connectionString) | ||||
|                     ? throw new InvalidConfigurationException("AzureCommunication", string.Empty) | ||||
|                     : new CommunicationIdentityClient(connectionString); | ||||
|             }); | ||||
|             builder.Services.AddScoped<CallAutomationClient>(provider => | ||||
|             { | ||||
|                 var connectionString = config.GetConnectionString("AzureCommunication"); | ||||
|                 return string.IsNullOrEmpty(connectionString) | ||||
|                     ? throw new InvalidConfigurationException("AzureCommunication", string.Empty) | ||||
|                     : new CallAutomationClient(connectionString); | ||||
|             }); | ||||
| 
 | ||||
|             var app = builder.Build(); | ||||
| 
 | ||||
|  | ||||
| @ -7,7 +7,8 @@ | ||||
|     }, | ||||
|     "AllowedHosts": "*", | ||||
|     "ConnectionStrings": { | ||||
|         "NotaryoDatabase": "Host=localhost; Database=enotaryodb; Username=enotaryodbuser; Password=secret" | ||||
|         "NotaryoDatabase": "Host=localhost; Database=enotaryodb; Username=enotaryodbuser; Password=secret", | ||||
|         "AzureCommunication": "secret" | ||||
|     }, | ||||
|     "CompreFaceConfig": { | ||||
|         "APIKey": "secret", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user