ApplicationLifetimeSample.Services.DataManager.LoadTempSessionAsync C# (CSharp) Метод

LoadTempSessionAsync() публичный Метод

public LoadTempSessionAsync ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task
        public async Task LoadTempSessionAsync()
        {
            Stream stream = await ApplicationData.Current.LocalCacheFolder.OpenStreamForReadAsync(SessionStateFile);
            var serializer = new JsonSerializer();
            using (var reader = new StreamReader(stream))
            {
                string json = await reader.ReadLineAsync();
                Dictionary<string, string> state = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
                _state = state;

                foreach (var item in state)
                {
                    OnPropertyChanged(item.Key);
                }
            }
        }