50 references to ParsedUri
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
RazorRequestContext.cs (1)
14internal Uri? Uri => context.TextDocument?.GetURI().ParsedUri;
Microsoft.CodeAnalysis.LanguageServer (10)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (4)
108private string GetDocumentFilePath(DocumentUri uri) => uri.ParsedUri is { } parsedUri ? ProtocolConversions.GetDocumentFilePathFromUri(parsedUri) : uri.UriString; 173if (uri.ParsedUri is null || !uri.ParsedUri.IsFile || !VirtualProjectXmlProvider.IsFileBasedProgram(documentText)) 183var doDesignTimeBuild = uri.ParsedUri?.IsFile is true && supportsDesignTimeBuild;
HostWorkspace\AutoLoadProjectsInitializer.cs (6)
53if (folder.DocumentUri.ParsedUri is not null && folder.DocumentUri.ParsedUri.Scheme == Uri.UriSchemeFile) 55var folderPath = ProtocolConversions.GetDocumentFilePathFromUri(folder.DocumentUri.ParsedUri); 77if (folder.DocumentUri.ParsedUri is null || folder.DocumentUri.ParsedUri.Scheme != Uri.UriSchemeFile) 83var folderPath = ProtocolConversions.GetDocumentFilePathFromUri(folder.DocumentUri.ParsedUri);
Microsoft.CodeAnalysis.LanguageServer.Protocol (31)
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\SourceGenerators\SourceGeneratorRefreshQueue.cs (1)
125var hasOpenSourceGeneratedDocuments = _lspWorkspaceManager.GetTrackedLspText().Keys.Any(uri => uri.ParsedUri?.Scheme == SourceGeneratedDocumentUri.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)
52if (uri.ParsedUri is not null) 54documentFilePath = ProtocolConversions.GetDocumentFilePathFromUri(uri.ParsedUri);
Workspaces\LspWorkspaceManager.cs (3)
111if (uri.ParsedUri is null) 393_trackedDocuments.Keys.Where(static trackedDocument => trackedDocument.ParsedUri?.Scheme == SourceGeneratedDocumentUri.Scheme) 395.Select(uri => (identity: SourceGeneratedDocumentUri.DeserializeIdentity(workspaceCurrentSolution, uri.ParsedUri!), _trackedDocuments[uri].SourceText))
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (8)
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); 983Assert.NotNull(results.Single().Diagnostics!.Single().CodeDescription!.Href.ParsedUri); 1475Assert.True(results[0].Uri.ParsedUri!.AbsolutePath.EndsWith("file.cs")); 1480Assert.True(results[1].Uri.ParsedUri!.AbsolutePath.EndsWith("GeneratedFile.cs")); 1483Assert.True(results[2].Uri.ParsedUri!.AbsolutePath.EndsWith("Assembly1.csproj"));
UriTests.cs (1)
340Assert.Null(invalidUri.ParsedUri);