public SyntaxNode Retrieve(SyntaxTree tree, ISyntaxTreeFactoryService service, CancellationToken cancellationToken) { ITemporaryStorage storage; if (!map.TryGetValue(tree, out storage)) { return(null); } using (var stream = storage.ReadStream(cancellationToken)) { return(service.DeserializeNodeFrom(stream, cancellationToken)); } }
public async Task <SyntaxNode> RetrieveAsync(SyntaxTree tree, ISyntaxTreeFactoryService service, CancellationToken cancellationToken) { ITemporaryStorage storage; if (!map.TryGetValue(tree, out storage)) { return(null); } using (var stream = await storage.ReadStreamAsync(cancellationToken).ConfigureAwait(false)) { return(service.DeserializeNodeFrom(stream, cancellationToken)); } }
public SyntaxNode Retrieve(SyntaxTree tree, ISyntaxTreeFactoryService service, CancellationToken cancellationToken) { ITemporaryStorage storage; if (!map.TryGetValue(tree, out storage)) { return null; } using (var stream = storage.ReadStream(cancellationToken)) { return service.DeserializeNodeFrom(stream, cancellationToken); } }
public async Task<SyntaxNode> RetrieveAsync(SyntaxTree tree, ISyntaxTreeFactoryService service, CancellationToken cancellationToken) { ITemporaryStorage storage; if (!map.TryGetValue(tree, out storage)) { return null; } using (var stream = await storage.ReadStreamAsync(cancellationToken).ConfigureAwait(false)) { return service.DeserializeNodeFrom(stream, cancellationToken); } }