Skip to content
Permalink
Browse files

add config object

  • Loading branch information...
Mark Garner
Mark Garner committed Sep 6, 2019
1 parent 89363ba commit 0aadc040e71554857a37e86ba22318cf81389945
Showing with 22 additions and 8 deletions.
  1. +1 −1 episode-073.md
  2. +1 −1 episode-074.md
  3. +1 −1 episode-075.md
  4. +13 −0 src/Models/Config.cs
  5. +2 −2 src/Models/DocumentDBRepository.cs
  6. +4 −3 src/Program.cs
@@ -10,7 +10,7 @@
* iTunes: aka.ms/afn-iTunes
* Google Play: aka.ms/afn-google
* Stitcher: aka.ms/afn-stitcher
* Youtube: [Azure Flash News on Youtube](https://www.youtube.com/channel/UCV6U_D4q7OxQaf0rFfEb6fQ)
* Youtube: [Azure Flash News Channel on YouTube](https://www.youtube.com/channel/UCV6U_D4q7OxQaf0rFfEb6fQ)

## Preview of custom content in Azure Policy guest configuration
https://azure.microsoft.com/en-us/blog/preview-of-custom-content-in-azure-policy-guest-configuration/
@@ -10,7 +10,7 @@
* iTunes: aka.ms/afn-iTunes
* Google Play: aka.ms/afn-google
* Stitcher: aka.ms/afn-stitcher
* Youtube: [Azure Flash News on Youtube](https://www.youtube.com/channel/UCV6U_D4q7OxQaf0rFfEb6fQ)
* Youtube: [Azure Flash News Channel on YouTube](https://www.youtube.com/channel/UCV6U_D4q7OxQaf0rFfEb6fQ)


## Azure Load Balancer becomes more efficient
@@ -10,7 +10,7 @@
* iTunes: aka.ms/afn-iTunes
* Google Play: aka.ms/afn-google
* Stitcher: aka.ms/afn-stitcher
* Youtube: [Azure Flash News on Youtube](https://www.youtube.com/channel/UCV6U_D4q7OxQaf0rFfEb6fQ)
* Youtube: [Azure Flash News Channel on YouTube](https://www.youtube.com/channel/UCV6U_D4q7OxQaf0rFfEb6fQ)


## Microsoft acquires Movere to help customers unlock cloud innovation with seamless migration tools
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace produce.Models
{
public class Config
{
public static string CosmosDBKey {get;set;}
public static string StorageAccountConnectionString {get;set;}
}
}
@@ -14,7 +14,7 @@ public static class DocumentDBRepository<T> where T : class
{

private static readonly string Endpoint = "https://affrss.documents.azure.com:443/";
private static readonly string Key = "";
//private static readonly string Key = "";
private static readonly string DatabaseId = "AFFRSS";
private static readonly string CollectionId = "rss";
private static DocumentClient client;
@@ -101,7 +101,7 @@ public static void Initialize()
//connectionPolicy.PreferredLocations.Add(LocationNames.WestUS2); // first preference
//connectionPolicy.PreferredLocations.Add(LocationNames.SouthCentralUS); // second preference

client = new DocumentClient(new Uri(Endpoint), Key, connectionPolicy);
client = new DocumentClient(new Uri(Endpoint), Config.CosmosDBKey, connectionPolicy);
}
CreateDatabaseIfNotExistsAsync().Wait();
CreateCollectionIfNotExistsAsync().Wait();
@@ -22,6 +22,9 @@ static void Main(string[] args)
{
ShowNumber = args[0];
RawFilePathAndName = args[1];
Config.CosmosDBKey = "";
Config.StorageAccountConnectionString = "";

DoWork().GetAwaiter().GetResult();
}

@@ -151,9 +154,7 @@ static private void ProcessAndUploadVideo()
file.Close();
}

string storageConnectionString = "";

CloudStorageAccount account = CloudStorageAccount.Parse(storageConnectionString);
CloudStorageAccount account = CloudStorageAccount.Parse(Config.StorageAccountConnectionString);
CloudBlobClient serviceClient = account.CreateCloudBlobClient();

// Create container. Name must be lower case.

0 comments on commit 0aadc04

Please sign in to comment.
You can’t perform that action at this time.