Пример #1
0
        public async Task SaveAsyncThenRead()
        {
            var dummy = new DummySerializable {
                Value = 1
            };
            var file = this.directory.CreateFileInfoInDirectory("dummy.json");
            await BinaryFile.SaveAsync(file, dummy).ConfigureAwait(false);

            var read = await BinaryFile.ReadAsync <DummySerializable>(file).ConfigureAwait(false);

            Assert.AreNotSame(dummy, read);
            Assert.AreEqual(dummy.Value, read.Value);
        }
Пример #2
0
 public async Task <BinaryFile> SelectAsync(string directory, Guid id)
 {
     return(await BinaryFile.ReadAsync(directory, id));
 }
Пример #3
0
 public Task <BinaryFile> GetAsync(string directory, Guid id)
 {
     return(BinaryFile.ReadAsync(directory, id));
 }
 public async Task <BinaryFile> SelectAsync(String directory, Guid id)
 => await BinaryFile.ReadAsync(directory, id).ConfigureAwait(false);