microsoft/vscode-react-native

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
1.7.1

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/extension/debuggingConfiguration/configurationProviders/configProviderFactory.ts

23lines · modepreview

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.

import { RunConfigProvider } from "./runConfigProvider";
import { DebugConfigProvider } from "./debugConfigProvider";
import { AttachConfigProvider } from "./attachConfigProvider";
import { DebugScenarioType } from "../debugConfigTypesAndConstants";
import { BaseConfigProvider } from "./baseConfigProvider";

export class ConfigProviderFactory {
    public static create(configurationType: string): BaseConfigProvider {
        switch (configurationType) {
            case DebugScenarioType.RunApp:
                return new RunConfigProvider();
            case DebugScenarioType.DebugApp:
                return new DebugConfigProvider();
            case DebugScenarioType.AttachApp:
                return new AttachConfigProvider();
            default:
                throw new Error(`Couldn't find ${configurationType} config adapter type`);
        }
    }
}