Exemple #1
0
        public Dictionary <string, string> GetAzureBlobStorageSAS()
        {
            string SASToken = _azureBlobAuthService.GenerateSAS(_azureBlobStorageConfig.AccountKey, _azureBlobStorageConfig.AccountName);
            Dictionary <string, string> result = new Dictionary <string, string>();

            result.Add("storageUri", _azureBlobStorageConfig.StorageUri);
            result.Add("storageAccessToken", SASToken);

            return(result);
        }
        public Dictionary <string, string> GetAzureBlobStorageSAS()
        {
            try
            {
                string SASToken = _azureBlobAuthService.GenerateSAS(_azureBlobStorageConfig.AccountKey, _azureBlobStorageConfig.AccountName);

                Dictionary <string, string> result = new Dictionary <string, string>();

                result.Add("storageUri", _azureBlobStorageConfig.StorageUri);
                result.Add("storageAccessToken", SASToken);

                return(result);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                return(null);
            }
        }