Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function activateIoTHub(context: vscode.ExtensionContext, outputChannel: vscode.OutputChannel) {
const iotHubTreeItem = new IoTHubAccountTreeItem();
const iotHubExtTreeDataProvider = new AzExtTreeDataProvider(iotHubTreeItem, "azure-iot-hub.loadMore");
const azureIoTExplorer = new AzureIoTExplorer(outputChannel, context, iotHubExtTreeDataProvider);
// Note: Hide IoT Hub tree view from Azure viewlet
// context.subscriptions.push(iotHubTreeItem);
// context.subscriptions.push(vscode.window.createTreeView("iotHubExplorer", { treeDataProvider: iotHubExtTreeDataProvider, showCollapseAll: true }));
// registerCommand("azure-iot-hub.setIoTHub", async (actionContext: IActionContext, node?: IoTHubResourceTreeItem) => {
// await azureIoTExplorer.setIoTHub(actionContext, node);
// });
// registerCommand("azure-iot-hub.loadMore", async (actionContext: IActionContext, node: AzureTreeItem) => {
// await azureIoTExplorer.loadMore(actionContext, node);
// });
// registerCommand("azure-iot-hub.refresh", async (actionContext: IActionContext, node: AzureTreeItem) => {
function activateDps(context: vscode.ExtensionContext, outputChannel: vscode.OutputChannel) {
let dpsTreeItem = new DpsAccountTreeItem();
let dpsExtTreeDataProvider = new AzExtTreeDataProvider(dpsTreeItem, "azure-iot-dps.loadMore");
context.subscriptions.push(dpsTreeItem);
context.subscriptions.push(vscode.window.createTreeView("iotDpsExplorer", { treeDataProvider: dpsExtTreeDataProvider, showCollapseAll: true }));
let azureDpsExplorer = new AzureDpsExplorer(outputChannel, dpsExtTreeDataProvider);
registerCommand("azure-iot-dps.viewProperties", async (actionContext: IActionContext, node?: DpsResourceTreeItem) => {
await azureDpsExplorer.viewProperties(actionContext, node);
});
registerCommand("azure-iot-dps.loadMore", async (actionContext: IActionContext, node: AzureTreeItem) => {
await azureDpsExplorer.loadMore(actionContext, node);
});
registerCommand("azure-iot-dps.refresh", async (actionContext: IActionContext, node: AzureTreeItem) => {
await azureDpsExplorer.refresh(actionContext, node);
});
}