/// <summary> /// Attempt to load the profile from the Override File Path. /// </summary> /// <param name="fallback">The fallback data to use if no file is found.</param> /// <returns>The loaded configuration</returns> public static async Task <AnchoringServiceProfile> Load(AnchoringServiceProfile fallback = null) { ServiceConfigurationFile file = new ServiceConfigurationFile(); // load in the installed file ServiceConfigurationFile.FileData fileData = await file.LoadMerged(); fallback = CreateProfile(fileData, fallback); return(fallback); }
/// <summary> /// Attempt to load the profile from the Override File Path. /// </summary> /// <param name="fallback"></param> /// <returns></returns> public static async Task <RemoteRenderingServiceProfile> Load(RemoteRenderingServiceProfile fallback = null) { ServiceConfigurationFile file = new ServiceConfigurationFile(); // load in the installed file ServiceConfigurationFile.FileData deployedFile = await file.LoadDeployed(); fallback = CreateProfile(deployedFile, fallback); // load in overrides ServiceConfigurationFile.FileData overrideFile = await file.LoadOverrides(); fallback = CreateProfile(overrideFile, fallback); return(fallback); }