From 12bd3dd028e110f8fcc4e516b249d1b31af824e9 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Tue, 3 Oct 2023 21:57:01 -0700 Subject: [PATCH] Add O# EA accessor for DocumentId.CreateFromSerialized --- .../OmniSharp/InternalAPI.Unshipped.txt | 2 ++ .../OmniSharp/Workspace/OmniSharpDocumentId.cs | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/Tools/ExternalAccess/OmniSharp/Workspace/OmniSharpDocumentId.cs diff --git a/src/Tools/ExternalAccess/OmniSharp/InternalAPI.Unshipped.txt b/src/Tools/ExternalAccess/OmniSharp/InternalAPI.Unshipped.txt index fb8a6f4c939c6..10e67fff6411a 100644 --- a/src/Tools/ExternalAccess/OmniSharp/InternalAPI.Unshipped.txt +++ b/src/Tools/ExternalAccess/OmniSharp/InternalAPI.Unshipped.txt @@ -273,6 +273,7 @@ Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Structure.OmniSharpBlockStructur Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Structure.OmniSharpBlockStructureOptions.ToBlockStructureOptions() -> Microsoft.CodeAnalysis.Structure.BlockStructureOptions! Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Structure.OmniSharpBlockStructureService Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Structure.OmniSharpBlockTypes +Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Workspace.OmniSharpDocumentId override Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CodeActions.OmniSharpCodeActionOptions.GetHashCode() -> int override Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Completion.OmniSharpCompletionOptions.GetHashCode() -> int override Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Formatting.OmniSharpSyntaxFormattingOptionsWrapper.GetHashCode() -> int @@ -358,6 +359,7 @@ static Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Structure.OmniSharpBlockT static Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Structure.OmniSharpBlockTypes.PreprocessorRegion.get -> string! static Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Structure.OmniSharpBlockTypes.Statement.get -> string! static Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Structure.OmniSharpBlockTypes.Type.get -> string! +static Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Workspace.OmniSharpDocumentId.CreateFromSerialized(Microsoft.CodeAnalysis.ProjectId! projectId, System.Guid id, bool isSourceGenerated, string? debugName) -> Microsoft.CodeAnalysis.DocumentId! virtual Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.NavigateTo.OmniSharpNavigateToSearcher.OmniSharpNavigateToCallback.Invoke(Microsoft.CodeAnalysis.Project! project, in Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.NavigateTo.OmniSharpNavigateToSearchResult result, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task! ~override Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CodeActions.OmniSharpCodeActionOptions.Equals(object obj) -> bool ~override Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CodeActions.OmniSharpCodeActionOptions.ToString() -> string diff --git a/src/Tools/ExternalAccess/OmniSharp/Workspace/OmniSharpDocumentId.cs b/src/Tools/ExternalAccess/OmniSharp/Workspace/OmniSharpDocumentId.cs new file mode 100644 index 0000000000000..011413a2732f0 --- /dev/null +++ b/src/Tools/ExternalAccess/OmniSharp/Workspace/OmniSharpDocumentId.cs @@ -0,0 +1,14 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.Workspace +{ + internal static class OmniSharpDocumentId + { + public static DocumentId CreateFromSerialized(ProjectId projectId, Guid id, bool isSourceGenerated, string? debugName) + => DocumentId.CreateFromSerialized(projectId, id, isSourceGenerated, debugName); + } +}