microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
4cd259621ddfbd348fade892a2f3ee87fd1924c5

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/extension/debuggingConfiguration/configurationProviders/configProviderFactory.ts

23lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4import { RunConfigProvider } from "./runConfigProvider";
5import { DebugConfigProvider } from "./debugConfigProvider";
6import { AttachConfigProvider } from "./attachConfigProvider";
7import { DebugScenarioType } from "../debugConfigTypesAndConstants";
8import { BaseConfigProvider } from "./baseConfigProvider";
9
10export class ConfigProviderFactory {
11 public static create(configurationType: string): BaseConfigProvider {
12 switch (configurationType) {
13 case DebugScenarioType.RunApp:
14 return new RunConfigProvider();
15 case DebugScenarioType.DebugApp:
16 return new DebugConfigProvider();
17 case DebugScenarioType.AttachApp:
18 return new AttachConfigProvider();
19 default:
20 throw new Error(`Couldn't find ${configurationType} config adapter type`);
21 }
22 }
23}
24