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); }
public async Task <BinaryFile> SelectAsync(string directory, Guid id) { return(await BinaryFile.ReadAsync(directory, id)); }
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);