Ejemplo n.º 1
0
        private async Task LoadConfig()
        {
            // Get a file from the installation folder with the ms-appx URI scheme.
            var file = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Config/config.json"));

            using (Stream stream = await file.OpenStreamForReadAsync())
            {
                using (StreamReader sr = new StreamReader(stream))
                {
                    string configJSON = sr.ReadToEnd();
                    WebConfig = WebConfig.CreateConfig(configJSON);
                }
            }
        }