mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
Merge from vscode e1d3dd53d17fb1529a002e4d6fb066db0a0bd385 (#6460)
* Merge from vscode e1d3dd53d17fb1529a002e4d6fb066db0a0bd385 * fix servers icon * fix tests
This commit is contained in:
26
src/vs/workbench/api/browser/mainThreadDownloadService.ts
Normal file
26
src/vs/workbench/api/browser/mainThreadDownloadService.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { MainContext, IExtHostContext, MainThreadDownloadServiceShape } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
|
||||
import { IDownloadService } from 'vs/platform/download/common/download';
|
||||
import { UriComponents, URI } from 'vs/base/common/uri';
|
||||
|
||||
@extHostNamedCustomer(MainContext.MainThreadDownloadService)
|
||||
export class MainThreadDownloadService extends Disposable implements MainThreadDownloadServiceShape {
|
||||
|
||||
constructor(
|
||||
extHostContext: IExtHostContext,
|
||||
@IDownloadService private readonly downloadService: IDownloadService
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
$download(uri: UriComponents, to: UriComponents): Promise<void> {
|
||||
return this.downloadService.download(URI.revive(uri), URI.revive(to));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user