当前位置: 首页>>代码示例>>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;未经允许,请勿转载。