Ejemplo n.º 1
0
 public void EnQueueMessage(string message, string queueName)
 {
     if (queue == null)
     {
         AzureKeyVaultConnection(SecureSecrets.GetSecret("AzureKeyVaultClientId"), SecureSecrets.GetSecret("AzureKeyVaultClientSecret"), SecureSecrets.GetSecret("AzureTranslatorTenantId"), new Uri(SecureSecrets.GetSecret("AzureKeyVaultUrl")));
         AzureQueueConnection(queueName).GetAwaiter();
     }
     var enqueueMessage = queue.EnqueueMessage(message);
 }
        public AzureKeyVaultSecureSecrets()
        {
            string clientId     = SecureSecrets.GetSecret("AzureKeyVaultClientId");
            string clientSecret = SecureSecrets.GetSecret("AzureKeyVaultClientSecret");
            string tenantId     = SecureSecrets.GetSecret("AzureTranslatorTenantId");
            Uri    keyVaultUri  = new Uri(SecureSecrets.GetSecret("AzureKeyVaultUrl"));

            client = new SecretClient(keyVaultUri, new ClientSecretCredential(tenantId, clientId, clientSecret));
        }
Ejemplo n.º 3
0
 public AzureQueueHandler(string queueName, string connectionStorageStringName = "MyConnectionStorageString") : base(SecureSecrets.GetSecret(connectionStorageStringName), queueName)
 {
     this.CreateAsync().GetAwaiter();
 }