internal static async Task CleanUp(RootCustomSettings customSettings) { Console.WriteLine("Deleting Search Index related resources..."); await JournalHelper.Search.SearchHelper.DeleteSearchResourcesAsync( customSettings.SearchConfigSettings.ServiceKey, customSettings.SearchConfigSettings.ServiceUrl, customSettings.SearchConfigSettings.IndexName ); Console.WriteLine("Deleting all blob containers..."); // delete azure blob containers await Helper.GetBlobManager().DeleteBlobContainerAsync(Program.customSettings.AzureBlobContainers.BatchTranscribedJsonResults); await Helper.GetBlobManager().DeleteBlobContainerAsync(Program.customSettings.AzureBlobContainers.ExtractedTranscribedTexts); await Helper.GetBlobManager().DeleteBlobContainerAsync(Program.customSettings.AzureBlobContainers.InputVoiceMemoFiles); await Helper.GetBlobManager().DeleteBlobContainerAsync(Program.customSettings.AzureBlobContainers.TaggedPhotos); await Helper.GetBlobManager().DeleteBlobContainerAsync(Program.customSettings.AzureBlobContainers.TravelJournals); Console.WriteLine("Deleting all output directories used..."); // delete output Folders Directory.Delete(Program.customSettings.SampleDataFolders.BatchTranscribedFolder, true); Directory.Delete(Program.customSettings.SampleDataFolders.ExtractedTagsFolder, true); Directory.Delete(Program.customSettings.SampleDataFolders.TaggedPhotosFolder, true); Directory.Delete(Program.customSettings.SampleDataFolders.TranscribedFileFolder, true); Directory.Delete(Program.customSettings.SampleDataFolders.TravelJournalsFolder, true); Directory.Delete(Program.customSettings.SampleDataFolders.AnalyzedImagesFolder, true); }
// Load JSON static internal RootCustomSettings LoadCustomSettingsJson() { using (StreamReader r = new StreamReader("AppCustomSettings.json")) { string json = r.ReadToEnd(); RootCustomSettings customSettings = JsonConvert.DeserializeObject <RootCustomSettings>(json); return(customSettings); } }
public Scenarios(RootCustomSettings rcs) { customSettings = rcs; }