43 references to ParsedUri
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
RazorRequestContext.cs (1)
14internal Uri? Uri => context.TextDocument?.GetURI().ParsedUri;
Microsoft.CodeAnalysis.LanguageServer (2)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (2)
62private string GetDocumentFilePath(DocumentUri uri) => uri.ParsedUri is { } parsedUri ? ProtocolConversions.GetDocumentFilePathFromUri(parsedUri) : uri.UriString; 88var doDesignTimeBuild = uri.ParsedUri?.IsFile is true
Microsoft.CodeAnalysis.LanguageServer.Protocol (33)
Extensions\Extensions.cs (9)
63Contract.ThrowIfNull(documentUri.ParsedUri, $"URI {documentUri} could not be parsed"); 64return documentUri.ParsedUri; 84if (documentUri.ParsedUri is null) 92if (documentUri.ParsedUri.Scheme != SourceGeneratedDocumentUri.Scheme) 93return solution.GetDocumentIdsWithFilePath(ProtocolConversions.GetDocumentFilePathFromUri(documentUri.ParsedUri)); 98var documentId = SourceGeneratedDocumentUri.DeserializeIdentity(solution, documentUri.ParsedUri)?.DocumentId; 119if (documentIdentifier.DocumentUri.ParsedUri?.Scheme == SourceGeneratedDocumentUri.Scheme) 181if (projectIdentifier.DocumentUri.ParsedUri is null) 186var projects = solution.Projects.Where(project => project.FilePath == projectIdentifier.DocumentUri.ParsedUri.LocalPath).ToImmutableArray();
Handler\SourceGenerators\SourceGeneratorRefreshQueue.cs (1)
126var 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)
84if (otherUri.ParsedUri is null || this.ParsedUri is null) 103if (this.ParsedUri.IsAbsoluteUri && otherUri.ParsedUri.IsAbsoluteUri && this.ParsedUri.AbsoluteUri == otherUri.ParsedUri.AbsoluteUri) 109return Uri.Equals(this.ParsedUri, otherUri.ParsedUri); 115if (this.ParsedUri is null) 121if (this.ParsedUri.IsAbsoluteUri) 132return StringComparer.OrdinalIgnoreCase.GetHashCode(this.ParsedUri.AbsoluteUri); 136return this.ParsedUri.GetHashCode();
Workspaces\LspMiscellaneousFilesWorkspaceProvider.cs (4)
52if (uri.ParsedUri is not null) 54documentFilePath = ProtocolConversions.GetDocumentFilePathFromUri(uri.ParsedUri); 98if (removeFromMetadataWorkspace && uri.ParsedUri is not null && metadataAsSourceFileService.TryRemoveDocumentFromWorkspace(ProtocolConversions.GetDocumentFilePathFromUri(uri.ParsedUri)))
Workspaces\LspWorkspaceManager.cs (3)
112if (uri.ParsedUri is null) 380_trackedDocuments.Keys.Where(static trackedDocument => trackedDocument.ParsedUri?.Scheme == SourceGeneratedDocumentUri.Scheme) 382.Select(uri => (identity: SourceGeneratedDocumentUri.DeserializeIdentity(workspaceCurrentSolution, uri.ParsedUri!), _trackedDocuments[uri].Text))
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
Diagnostics\PullDiagnosticTests.cs (4)
71Assert.NotNull(results.Single().Diagnostics!.Single().CodeDescription!.Href.ParsedUri); 616Assert.NotNull(results.Single().Diagnostics!.Single().CodeDescription!.Href.ParsedUri); 636Assert.NotNull(results.Single().Diagnostics!.Single().CodeDescription!.Href.ParsedUri); 966Assert.NotNull(results.Single().Diagnostics!.Single().CodeDescription!.Href.ParsedUri);
UriTests.cs (1)
340Assert.Null(invalidUri.ParsedUri);
Microsoft.VisualStudio.LanguageServices.Xaml (2)
Implementation\LanguageServer\XamlRequestExecutionQueue.cs (2)
27if (request is ITextDocumentParams { TextDocument.DocumentUri: { ParsedUri: not null } documentUri }) 29_projectService.TrackOpenDocument(documentUri.ParsedUri.LocalPath);