当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript service.cp.Server类代码示例

本文整理汇总了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;未经允许,请勿转载。