Пример #1
0
        public async Task <T> ReadAsync(string filePath)
        {
            using (var ts = new EncryptedTextStore(_key))
            {
                var json = await ts.ReadAsync(filePath);

                return(JsonConvert.DeserializeObject <T>(json, _settings));
            }
        }
Пример #2
0
        public async Task WriteAsync(string filePath, T content)
        {
            using (var ts = new EncryptedTextStore(_key))
            {
                var json = JsonConvert.SerializeObject(content, _settings);

                await ts.WriteAsync(filePath, json);
            }
        }