Esempio n. 1
0
        private AppData LoadFromFile()
        {
            var serializer = new JsonSerializer();

            using (var stream = _streamStore.OpenRead(Filename))
            {
                if (stream == null)
                {
                    return(null);
                }

                using (var streamReader = new StreamReader(stream))
                    using (var jsonTextReader = new JsonTextReader(streamReader))
                    {
                        return(serializer.Deserialize <AppData>(jsonTextReader));
                    }
            }
        }
Esempio n. 2
0
 public Stream OpenRead(string name)
 {
     return(_streamStore.OpenRead(name));
 }