57 references to ParsedUri
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
RazorRequestContext.cs (1)
14internal Uri? Uri => context.TextDocument?.GetURI().ParsedUri;
Microsoft.CodeAnalysis.LanguageServer (4)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (1)
97private static string GetDocumentFilePath(DocumentUri uri) => uri.ParsedUri is { } parsedUri ? ProtocolConversions.GetDocumentFilePathFromUri(parsedUri) : uri.UriString;
HostWorkspace\AutoLoadProjectsInitializer.cs (3)
123if (folder.DocumentUri.ParsedUri is null || folder.DocumentUri.ParsedUri.Scheme != Uri.UriSchemeFile) 130folderPath = ProtocolConversions.GetDocumentFilePathFromUri(folder.DocumentUri.ParsedUri);
Microsoft.CodeAnalysis.LanguageServer.Protocol (33)
Extensions\Extensions.cs (9)
64Contract.ThrowIfNull(documentUri.ParsedUri, $"URI {documentUri} could not be parsed"); 65return documentUri.ParsedUri; 92if (documentUri.ParsedUri is null) 100if (documentUri.ParsedUri.Scheme != SourceGeneratedDocumentUri.Scheme) 101return solution.GetDocumentIdsWithFilePath(ProtocolConversions.GetDocumentFilePathFromUri(documentUri.ParsedUri)); 106var documentId = SourceGeneratedDocumentUri.DeserializeIdentity(solution, documentUri.ParsedUri)?.DocumentId; 135if (documentUri.ParsedUri?.Scheme == SourceGeneratedDocumentUri.Scheme) 195if (projectIdentifier.DocumentUri.ParsedUri is null) 200var projects = solution.Projects.WhereAsArray(project => project.FilePath == projectIdentifier.DocumentUri.ParsedUri.LocalPath);
Handler\InitializeManager.cs (1)
42if (workspaceFolder.DocumentUri.ParsedUri is not { } parsedUri)
Handler\TextDocumentContent\AbstractTextDocumentContentRefreshQueue.cs (1)
98if (uri.ParsedUri is { } parsedUri && parsedUri.Scheme == Scheme)
Handler\TextDocumentContent\TextDocumentContentHandler.cs (1)
31var scheme = request.Uri.ParsedUri?.Scheme;
LanguageInfoProvider.cs (4)
51if (requestUri.ParsedUri is not null && (requestUri.ParsedUri.IsFile || requestUri.ParsedUri.IsAbsoluteUri)) 53var localPath = requestUri.ParsedUri.LocalPath;
Protocol\DocumentUri.cs (12)
79if (otherUri.ParsedUri is null || this.ParsedUri is null) 96return (this.ParsedUri.IsAbsoluteUri && otherUri.ParsedUri.IsAbsoluteUri && this.ParsedUri.AbsoluteUri == otherUri.ParsedUri.AbsoluteUri) || 97Equals(this.ParsedUri, otherUri.ParsedUri); 103if (this.ParsedUri is null) 117return this.ParsedUri.IsAbsoluteUri 118? StringComparer.OrdinalIgnoreCase.GetHashCode(this.ParsedUri.AbsoluteUri) 119: this.ParsedUri.GetHashCode();
Workspaces\LspMiscellaneousFilesWorkspaceProvider.cs (2)
44if (uri.ParsedUri is not null) 46documentFilePath = ProtocolConversions.GetDocumentFilePathFromUri(uri.ParsedUri);
Workspaces\LspWorkspaceManager.cs (3)
111if (uri.ParsedUri is null) 375_trackedDocuments.Keys.Where(static trackedDocument => trackedDocument.ParsedUri?.Scheme == SourceGeneratedDocumentUri.Scheme) 377.Select(uri => (identity: SourceGeneratedDocumentUri.DeserializeIdentity(workspaceCurrentSolution, uri.ParsedUri!), _trackedDocuments[uri].SourceText))
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (12)
Diagnostics\PullDiagnosticTests.cs (7)
84Assert.NotNull(results.Single().Diagnostics!.Single().CodeDescription!.Href.ParsedUri); 629Assert.NotNull(results.Single().Diagnostics!.Single().CodeDescription!.Href.ParsedUri); 649Assert.NotNull(results.Single().Diagnostics!.Single().CodeDescription!.Href.ParsedUri); 1055Assert.NotNull(results.Single().Diagnostics!.Single().CodeDescription!.Href.ParsedUri); 1547Assert.True(results[0].Uri.ParsedUri!.AbsolutePath.EndsWith("file.cs")); 1552Assert.True(results[1].Uri.ParsedUri!.AbsolutePath.EndsWith("GeneratedFile.cs")); 1555Assert.True(results[2].Uri.ParsedUri!.AbsolutePath.EndsWith("Assembly1.csproj"));
ProtocolConversionsTests.cs (2)
149Assert.Null(uri.ParsedUri); 161Assert.Null(uri.ParsedUri);
UriTests.cs (3)
342Assert.Null(invalidUri.ParsedUri); 364Assert.Null(unparseableUri.ParsedUri); 387Assert.Null(unparseableUri.ParsedUri);
Microsoft.CodeAnalysis.Razor.Workspaces (2)
Extensions\LspExtensions_TextDocumentIdentifier.cs (1)
39return textDocumentIdentifier.DocumentUri.ParsedUri is Uri parsedUri
UriExtensions.cs (1)
22=> uri.ParsedUri.AssumeNotNull();
Microsoft.VisualStudio.LanguageServices.Razor (3)
LanguageClient\Cohost\CohostTextPresentationEndpoint.cs (1)
70if (edit.TextDocument.DocumentUri.ParsedUri is { } uri &&
LanguageClient\Cohost\CohostUriPresentationEndpoint.cs (1)
111if (edit.TextDocument.DocumentUri.ParsedUri is { } uri &&
src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.CohostingShared\Navigation\CohostGoToImplementationEndpoint.cs (1)
120if (location?.DocumentUri.ParsedUri is { } uri &&
Microsoft.VisualStudioCode.RazorExtension (2)
Endpoints\RazorDocumentClosedEndpoint.cs (1)
36if (textDocument.DocumentUri.ParsedUri is Uri parsedUri)
src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.CohostingShared\Navigation\CohostGoToImplementationEndpoint.cs (1)
120if (location?.DocumentUri.ParsedUri is { } uri &&