mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 09:35:39 -05:00
25 lines
888 B
TypeScript
25 lines
888 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { IMainContext, MainContext, MainThreadClipboardShape } from 'vs/workbench/api/common/extHost.protocol';
|
|
import * as vscode from 'vscode';
|
|
|
|
export class ExtHostClipboard implements vscode.Clipboard {
|
|
|
|
private readonly _proxy: MainThreadClipboardShape;
|
|
|
|
constructor(mainContext: IMainContext) {
|
|
this._proxy = mainContext.getProxy(MainContext.MainThreadClipboard);
|
|
}
|
|
|
|
readText(): Promise<string> {
|
|
return this._proxy.$readText();
|
|
}
|
|
|
|
writeText(value: string): Promise<void> {
|
|
return this._proxy.$writeText(value);
|
|
}
|
|
}
|