mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Add connection profile persistence to MIAA dashboard (#11061)
* wip * fixes * fix pg model * more updates * Add resourceType check
This commit is contained in:
26
extensions/arc/src/models/resourceModel.ts
Normal file
26
extensions/arc/src/models/resourceModel.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 * as vscode from 'vscode';
|
||||
import { ResourceInfo, Registration } from './controllerModel';
|
||||
|
||||
export abstract class ResourceModel {
|
||||
|
||||
private readonly _onRegistrationUpdated = new vscode.EventEmitter<Registration>();
|
||||
public onRegistrationUpdated = this._onRegistrationUpdated.event;
|
||||
|
||||
constructor(public info: ResourceInfo, private _registration: Registration) { }
|
||||
|
||||
public get registration(): Registration {
|
||||
return this._registration;
|
||||
}
|
||||
|
||||
public set registration(newValue: Registration) {
|
||||
this._registration = newValue;
|
||||
this._onRegistrationUpdated.fire(this._registration);
|
||||
}
|
||||
|
||||
public abstract refresh(): Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user