uriIpc.ts ×15

Frontier kind: Code frontier

unlabeled · c_f03635a983ce

307 tests · 7520 LOC · 34 files · introduces 0 tests · 65 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
15 ranges65 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1110 ranges7520 lines · 34 files · Browse complete extent
All tests (intent)
307 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 65 introduced LOC across 15 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/base/common/uriIpc.ts 65 introduced LOC · 15 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- uriIpc.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import { VSBuffer } from './buffer.js';
7 > import { MarshalledObject } from './marshalling.js';
8 > import { MarshalledId } from './marshallingIds.js';
9 > import { URI, UriComponents } from './uri.js';
10 >
11 > export interface IURITransformer {
12 > transformIncoming(uri: UriComponents): UriComponents;
13 > transformOutgoing(uri: UriComponents): UriComponents;
14 > transformOutgoingURI(uri: URI): URI;
15 > transformOutgoingScheme(scheme: string): string;
16 > }
17 >
18 > export interface UriParts {
19 > scheme: string;
20 > authority?: string;
21 > path?: string;
22 > query?: string;
23 > fragment?: string;
24 > }
25 >
26 > export interface IRawURITransformer {
27 > transformIncoming(uri: UriParts): UriParts;
28 > transformOutgoing(uri: UriParts): UriParts;
29 > transformOutgoingScheme(scheme: string): string;
30 > }
31 >
32 function toJSON(uri: URI): UriComponents {
33 return uri.toJSON();
34 }
35 > uriIpc.ts
36 > export class URITransformer implements IURITransformer {
37 >
38 > private readonly _uriTransformer: IRawURITransformer;
39 >
40 > constructor(uriTransformer: IRawURITransformer) {
41 this._uriTransformer = uriTransformer;
42 }
43 > uriIpc.ts
44 > public transformIncoming(uri: UriComponents): UriComponents {
45 const result = this._uriTransformer.transformIncoming(uri);
46 return (result === uri ? uri : toJSON(URI.from(result)));
47 }
48 > uriIpc.ts
49 > public transformOutgoing(uri: UriComponents): UriComponents {
50 const result = this._uriTransformer.transformOutgoing(uri);
51 return (result === uri ? uri : toJSON(URI.from(result)));
52 }
53 > uriIpc.ts
54 > public transformOutgoingURI(uri: URI): URI {
55 const result = this._uriTransformer.transformOutgoing(uri);
56 return (result === uri ? uri : URI.from(result));
57 }
58 > uriIpc.ts
59 > public transformOutgoingScheme(scheme: string): string {
60 return this._uriTransformer.transformOutgoingScheme(scheme);
61 }
62 > } uriIpc.ts
63 >
64 > export const DefaultURITransformer: IURITransformer = new class {
65 > transformIncoming(uri: UriComponents) {
66 return uri;
67 }
68 > uriIpc.ts
69 > transformOutgoing(uri: UriComponents): UriComponents {
70 return uri;
71 }
72 > uriIpc.ts
73 > transformOutgoingURI(uri: URI): URI {
74 return uri;
75 }
76 > uriIpc.ts
77 > transformOutgoingScheme(scheme: string): string {
78 return scheme;
79 }
80 > }; uriIpc.ts
81 >
82 function _transformOutgoingURIs(obj: any, transformer: IURITransformer, depth: number): any {
83
104 return null;
105 }
106 > uriIpc.ts
107 > export function transformOutgoingURIs<T>(obj: T, transformer: IURITransformer): T {
108 const result = _transformOutgoingURIs(obj, transformer, 0);
109 if (result === null) {
113 return result;
114 }
115 > uriIpc.ts
116 >
117 function _transformIncomingURIs(obj: any, transformer: IURITransformer, revive: boolean, depth: number): any {
118
144 return null;
145 }
146 > uriIpc.ts
147 > export function transformIncomingURIs<T>(obj: T, transformer: IURITransformer): T {
148 const result = _transformIncomingURIs(obj, transformer, false, 0);
149 if (result === null) {
153 return result;
154 }
155 > uriIpc.ts
156 > export function transformAndReviveIncomingURIs<T>(obj: T, transformer: IURITransformer): T {
157 const result = _transformIncomingURIs(obj, transformer, true, 0);
158 if (result === null) {