Expose sql project apis (#15239)

* make project variables private and add getters

* expose project in sqlproj.d.ts

* add more comments

* change to ISqlProject
This commit is contained in:
Kim Santiago
2021-04-27 14:35:27 -10:00
committed by GitHub
parent f29d7308ff
commit da37cf6ec6
3 changed files with 204 additions and 75 deletions

View File

@@ -77,6 +77,13 @@ export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvide
return vscode.Uri.file(projectFile);
}
/**
* Opens and loads a .sqlproj file
*/
openProject(projectFilePath: string): Promise<sqldbproj.ISqlProject> {
return Project.openProject(projectFilePath);
}
/**
* Gets the supported project types
*/
@@ -116,15 +123,6 @@ export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvide
return [group, changeTargetPlatformAction];
}
/** Adds the list of files and directories to the project, and saves the project file
* @param projectFile The Uri of the project file
* @param list list of uris of files and folders to add. Files and folders must already exist. Files and folders must already exist. No files or folders will be added if any do not exist.
*/
async addToProject(projectFile: vscode.Uri, list: vscode.Uri[]): Promise<void> {
const project = await Project.openProject(projectFile.fsPath);
await project.addToProject(list);
}
/**
* Gets the data to be displayed in the project dashboard
*/