當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript uriIpc.IURITransformer類代碼示例

本文整理匯總了TypeScript中vs/base/common/uriIpc.IURITransformer的典型用法代碼示例。如果您正苦於以下問題:TypeScript IURITransformer類的具體用法?TypeScript IURITransformer怎麽用?TypeScript IURITransformer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了IURITransformer類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: _transformIncoming

	private _transformIncoming(extension: ILocalExtension, uriTransformer: IURITransformer): ILocalExtension {
		return extension ? { ...extension, ...{ location: URI.revive(uriTransformer.transformIncoming(extension.location)) } } : extension;
	}
開發者ID:donaldpipowitch,項目名稱:vscode,代碼行數:3,代碼來源:extensionManagementIpc.ts

示例2: transformOutgoingURI

function transformOutgoingURI(uri: URI, transformer: IURITransformer | null): URI {
	return transformer ? transformer.transformOutgoingURI(uri) : uri;
}
開發者ID:joelday,項目名稱:vscode,代碼行數:3,代碼來源:extensionManagementIpc.ts

示例3: transformIncomingURI

function transformIncomingURI(uri: UriComponents, transformer: IURITransformer | null): URI {
	return URI.revive(transformer ? transformer.transformIncoming(uri) : uri);
}
開發者ID:joelday,項目名稱:vscode,代碼行數:3,代碼來源:extensionManagementIpc.ts

示例4: TPromise

	download(from: URI, to: string): TPromise<void> {
		from = this.uriTransformer.transformOutgoing(from);
		const dirName = path.dirname(to);
		let out: fs.WriteStream;
		return new TPromise((c, e) => {
			return mkdirp(dirName)
				.then(() => {
					out = fs.createWriteStream(to);
					out.once('close', () => c(null));
					out.once('error', e);
					const uploadStream = this.channel.listen('upload', from);
					const disposable = uploadStream((result: UploadResponse) => {
						if (result === void 0) {
							out.end();
							disposable.dispose();
							c(null);
						} else if (Buffer.isBuffer(result)) {
							out.write(result);
						} else if (typeof result === 'string') {
							out.close();
							disposable.dispose();
							e(result);
						}
					});
				});
		});
	}
開發者ID:developers23,項目名稱:vscode,代碼行數:27,代碼來源:downloadIpc.ts

示例5:

	install(vsix: URI): Promise<IExtensionIdentifier> {
		return Promise.resolve(this.channel.call('install', [this.uriTransformer.transformOutgoing(vsix)]));
	}
開發者ID:DonJayamanne,項目名稱:vscode,代碼行數:3,代碼來源:extensionManagementIpc.ts

示例6: _transformOutgoing

	private _transformOutgoing(extension: ILocalExtension | undefined): ILocalExtension | undefined {
		return extension ? { ...extension, ...{ location: this.uriTransformer.transformOutgoing(extension.location) } } : extension;
	}
開發者ID:DonJayamanne,項目名稱:vscode,代碼行數:3,代碼來源:extensionManagementIpc.ts

示例7: _transformIncoming

	private _transformIncoming(extension: ILocalExtension | undefined): ILocalExtension | undefined {
		return extension ? { ...extension, ...{ location: URI.revive(this.uriTransformer.transformIncoming(extension.location)) } } : extension;
	}
開發者ID:DonJayamanne,項目名稱:vscode,代碼行數:3,代碼來源:extensionManagementIpc.ts

示例8: cloneAndChange

	return transformer ? cloneAndChange(extension, value => value instanceof URI ? transformer.transformOutgoingURI(value) : undefined) : extension;
開發者ID:joelday,項目名稱:vscode,代碼行數:1,代碼來源:extensionManagementIpc.ts


注:本文中的vs/base/common/uriIpc.IURITransformer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。