protected override async Task <SourceText> RecoverAsync(CancellationToken cancellationToken) { Contract.ThrowIfNull(_storage); using (Logger.LogBlock(FunctionId.Workspace_Recoverable_RecoverTextAsync, _parent._filePath, cancellationToken)) { return(await _storage.ReadTextAsync(cancellationToken).ConfigureAwait(false)); } }
protected override async Task <TextAndVersion> RecoverAsync(CancellationToken cancellationToken) { Contract.ThrowIfNull(_storage); using (Logger.LogBlock(FunctionId.Workspace_Recoverable_RecoverTextAsync, _storedFilePath, cancellationToken)) { var text = await _storage.ReadTextAsync(cancellationToken).ConfigureAwait(false); return(TextAndVersion.Create(text, _storedVersion, _storedFilePath)); } }