Skip to content

Commit

Permalink
Create experimentation service client (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwateratmsft authored Dec 4, 2023
1 parent 0c4af5f commit 1f5293f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'use strict';

import { registerAzureUtilsExtensionVariables, setupAzureLogger } from '@microsoft/vscode-azext-azureutils';
import { AzExtTreeDataProvider, AzureExtensionApiFactory, IActionContext, callWithTelemetryAndErrorHandling, createApiProvider, createAzExtLogOutputChannel, registerUIExtensionVariables } from '@microsoft/vscode-azext-utils';
import { AzExtTreeDataProvider, AzureExtensionApiFactory, IActionContext, callWithTelemetryAndErrorHandling, createApiProvider, createAzExtLogOutputChannel, createExperimentationService, registerUIExtensionVariables } from '@microsoft/vscode-azext-utils';
import { GetApiOptions, apiUtils } from 'api/src/utils/apiUtils';
import * as vscode from 'vscode';
import { ActivityLogTreeItem } from './activityLog/ActivityLogsTreeItem';
Expand Down Expand Up @@ -73,6 +73,7 @@ export async function activate(context: vscode.ExtensionContext, perfStats: { lo
context.subscriptions.push(vscode.workspace.registerFileSystemProvider(TagFileSystem.scheme, ext.tagFS));
registerTagDiagnostics();

ext.experimentationService = await createExperimentationService(context);

const helpTreeItem: HelpTreeItem = new HelpTreeItem();
ext.helpTree = new AzExtTreeDataProvider(helpTreeItem, 'ms-azuretools.loadMore');
Expand Down
4 changes: 3 additions & 1 deletion src/extensionVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { AzureSubscriptionProvider } from "@microsoft/vscode-azext-azureauth";
import { AzExtTreeDataProvider, IAzExtLogOutputChannel } from "@microsoft/vscode-azext-utils";
import { AzExtTreeDataProvider, IAzExtLogOutputChannel, IExperimentationServiceAdapter } from "@microsoft/vscode-azext-utils";
import { AzExtResourceType } from "api/src/AzExtResourceType";
import { DiagnosticCollection, Disposable, ExtensionContext, TreeView, UIKind, env } from "vscode";
import { ActivityLogTreeItem } from "./activityLog/ActivityLogsTreeItem";
Expand Down Expand Up @@ -65,6 +65,8 @@ export namespace ext {
export let focusViewTreeDataProvider: FocusViewTreeDataProvider;

export const actions = extActions;

export let experimentationService: IExperimentationServiceAdapter | undefined;
}

export type ResourceTypeGrouping = {
Expand Down

0 comments on commit 1f5293f

Please sign in to comment.