• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript service.cp.Server类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中vs/base/node/service.cp.Server的典型用法代码示例。如果您正苦于以下问题:TypeScript cp.Server类的具体用法?TypeScript cp.Server怎么用?TypeScript cp.Server使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了cp.Server类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: Server

/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

'use strict';

import { Server } from 'vs/base/node/service.cp';
import {SearchService} from 'vs/workbench/services/search/node/rawSearchService';

const server = new Server();
server.registerService('SearchService', new SearchService());
开发者ID:gaoxiaojun,项目名称:vscode,代码行数:12,代码来源:searchApp.ts


示例2: Server

/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
'use strict';

import { Server } from 'vs/base/node/service.cp';
import { TestService } from 'vs/base/test/node/service/testService';

const server = new Server();
server.registerService('TestService', new TestService());
开发者ID:1424667164,项目名称:vscode,代码行数:11,代码来源:testApp.ts


示例3: tmpdirSync

		var git = new gitlib.Git({
			gitPath: gitPath,
			tmpPath: tmpdirSync(), // TODO@Joao os.tmpdir()???
			defaultEncoding: defaultEncoding,
			env: env
		});

		super(git.open(path.normalize(basePath)));
	}
}

function tmpdirSync(): string {
	var path: string;
	var paths = /^win/i.test(process.platform) ? [process.env.TMP, process.env.TEMP] : ['/tmp', '/var/tmp', '/private/tmp', '/private/var/tmp'];

	for (var i = 0; i < paths.length; i++) {
		path = paths[i];
		try {
			if (fs.statSync(path).isDirectory()) {
				return path;
			}
		} catch (e) {
			// Ignore
		}
	}

	throw new Error('Temp dir not found');
}

const server = new Server();
server.registerService('GitService', new NativeRawGitService(process.argv[2], process.argv[3], process.argv[4], process.argv[5]));
开发者ID:gaoxiaojun,项目名称:vscode,代码行数:31,代码来源:gitApp.ts


示例4: tmpdir

				VSCODE_GIT_ASKPASS_NODE: exePath,
				VSCODE_GIT_ASKPASS_MODULE_ID: 'vs/workbench/parts/git/electron-main/askpass'
			});

			const git = new gitlib.Git({
				gitPath, version,
				tmpPath: tmpdir(),
				defaultEncoding: defaultEncoding,
				env: env
			});

			const repo = git.open(workspaceRoot);
			const promise = repo.getRoot()
				.then<string>(null, (err: gitlib.GitError) => {
					if (err instanceof gitlib.GitError && err.gitErrorCode === GitErrorCodes.NotAGitRepository) {
						return workspaceRoot;
					}

					return TPromise.wrapError(err);
				})
				.then(root => realpath(root))
				.then(root => git.open(root))
				.then(repo => new RawGitService(repo));

			super(promise);
		}
	}
}

const server = new Server();
server.registerService('GitService', new IPCRawGitService(process.argv[2], process.argv[3], process.argv[4], process.argv[5], process.argv[6]));
开发者ID:1833183060,项目名称:vscode,代码行数:31,代码来源:gitApp.ts


示例5: Server

/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
'use strict';

import { Server } from 'vs/base/node/service.cp';
import {ChokidarWatcherService} from 'vs/workbench/services/files/node/watcher/unix/chokidarWatcherService';

const server = new Server();
server.registerService('WatcherService', new ChokidarWatcherService());
开发者ID:1833183060,项目名称:vscode,代码行数:11,代码来源:watcherApp.ts



注:本文中的vs/base/node/service.cp.Server类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript service.net类代码示例发布时间:2022-05-25
下一篇:
TypeScript service.cp.Client类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap