From cd63b813bb8c4df02dab2772764c892caad0d4aa Mon Sep 17 00:00:00 2001 From: CyrusNajmabadi Date: Fri, 18 Nov 2016 17:04:33 -0800 Subject: [PATCH] Remove code. --- .../SyntaxTreeIdentifierInfo_Set.cs | 71 ------------------- 1 file changed, 71 deletions(-) delete mode 100644 src/Workspaces/Core/Portable/FindSymbols/SyntaxTree/SyntaxTreeIdentifierInfo_Set.cs diff --git a/src/Workspaces/Core/Portable/FindSymbols/SyntaxTree/SyntaxTreeIdentifierInfo_Set.cs b/src/Workspaces/Core/Portable/FindSymbols/SyntaxTree/SyntaxTreeIdentifierInfo_Set.cs deleted file mode 100644 index b742f62e03a..00000000000 --- a/src/Workspaces/Core/Portable/FindSymbols/SyntaxTree/SyntaxTreeIdentifierInfo_Set.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.CodeAnalysis.Host; -using Microsoft.CodeAnalysis.Shared.Extensions; -using Microsoft.CodeAnalysis.Versions; -using Roslyn.Utilities; - -namespace Microsoft.CodeAnalysis.FindSymbols -{ - internal partial class SyntaxTreeIdentifierInfo - { - public static bool TryGetIdentifierLocations(Document document, VersionStamp version, string identifier, List positions, CancellationToken cancellationToken) - { - var persistentStorageService = document.Project.Solution.Workspace.Services.GetService(); - using (var storage = persistentStorageService.GetStorage(document.Project.Solution)) - { - var esentStorage = storage as ISyntaxTreeInfoPersistentStorage; - if (esentStorage == null) - { - // basically, we don't support it. return true so that we don't try to precalculate it - return false; - } - - return esentStorage.ReadIdentifierPositions(document, version, identifier, positions, cancellationToken); - } - } - - public static async Task IdentifierSetPrecalculatedAsync(Document document, CancellationToken cancellationToken) - { - var syntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false); - var persistentStorageService = document.Project.Solution.Workspace.Services.GetService(); - - using (var storage = persistentStorageService.GetStorage(document.Project.Solution)) - { - var esentStorage = storage as ISyntaxTreeInfoPersistentStorage; - if (esentStorage == null) - { - // basically, we don't support it. return true so that we don't try to precalculate it - return true; - } - - var persistedVersion = esentStorage.GetIdentifierSetVersion(document); - return document.CanReusePersistedSyntaxTreeVersion(syntaxVersion, persistedVersion); - } - } - - public static async Task SaveIdentifierSetAsync(Document document, CancellationToken cancellationToken) - { - Contract.Requires(document.IsFromPrimaryBranch()); - - var persistentStorageService = document.Project.Solution.Workspace.Services.GetService(); - - using (var storage = persistentStorageService.GetStorage(document.Project.Solution)) - { - var esentStorage = storage as ISyntaxTreeInfoPersistentStorage; - if (esentStorage == null) - { - return; - } - - var version = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false); - var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); - - esentStorage.WriteIdentifierLocations(document, version, root, cancellationToken); - } - } - } -} -- GitLab