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));
                }
            }
Esempio n. 2
0
        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));
            }
        }