mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 09:35:37 -05:00
* Merge from vscode e3b9b8eefc062d68ba8a4b6a817162d132f3b533 * skip failing test * add comment
40 lines
2.0 KiB
TypeScript
40 lines
2.0 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
|
import { IWindowConfiguration } from 'vs/platform/windows/common/windows';
|
|
import { IRemoteAgentConnection, IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
|
|
import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver';
|
|
import product from 'vs/platform/product/node/product';
|
|
import { nodeSocketFactory } from 'vs/platform/remote/node/nodeSocketFactory';
|
|
import { AbstractRemoteAgentService, RemoteAgentConnection } from 'vs/workbench/services/remote/common/abstractRemoteAgentService';
|
|
import { ISignService } from 'vs/platform/sign/common/sign';
|
|
import { ISocketFactory } from 'vs/platform/remote/common/remoteAgentConnection';
|
|
import { ILogService } from 'vs/platform/log/common/log';
|
|
|
|
export class RemoteAgentService extends AbstractRemoteAgentService implements IRemoteAgentService {
|
|
|
|
public readonly socketFactory: ISocketFactory;
|
|
|
|
private readonly _connection: IRemoteAgentConnection | null = null;
|
|
|
|
constructor({ remoteAuthority }: IWindowConfiguration,
|
|
@IEnvironmentService environmentService: IEnvironmentService,
|
|
@IRemoteAuthorityResolverService remoteAuthorityResolverService: IRemoteAuthorityResolverService,
|
|
@ISignService signService: ISignService,
|
|
@ILogService logService: ILogService
|
|
) {
|
|
super(environmentService);
|
|
this.socketFactory = nodeSocketFactory;
|
|
if (remoteAuthority) {
|
|
this._connection = this._register(new RemoteAgentConnection(remoteAuthority, product.commit, nodeSocketFactory, remoteAuthorityResolverService, signService, logService));
|
|
}
|
|
}
|
|
|
|
getConnection(): IRemoteAgentConnection | null {
|
|
return this._connection;
|
|
}
|
|
}
|