From da3ca1fe027e5b50b40e27805bb0ff06849ace07 Mon Sep 17 00:00:00 2001 From: Charles Betros Date: Sun, 6 Oct 2019 21:52:54 -0500 Subject: [PATCH] Use enums for LaunchType --- source/Cosmos.VS.DebugEngine/AD7.Impl/AD7Process.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/Cosmos.VS.DebugEngine/AD7.Impl/AD7Process.cs b/source/Cosmos.VS.DebugEngine/AD7.Impl/AD7Process.cs index eb7fe567d..4e86d79eb 100644 --- a/source/Cosmos.VS.DebugEngine/AD7.Impl/AD7Process.cs +++ b/source/Cosmos.VS.DebugEngine/AD7.Impl/AD7Process.cs @@ -309,13 +309,11 @@ namespace Cosmos.VS.DebugEngine.AD7.Impl string xPortType = xParts[0].ToLower(); string xPortParam = xParts[1].ToLower(); - var xLaunch = mDebugInfo[BuildPropertyNames.LaunchString]; - OutputText("Starting debug connector."); switch (xPortType) { case "pipe:": - if (xLaunch == "HyperV") + if (mLaunch == LaunchType.HyperV || mLaunch == LaunchType.Qemu) { mDbgConnector = new DebugConnectorPipeClient(xPortParam); } @@ -325,7 +323,7 @@ namespace Cosmos.VS.DebugEngine.AD7.Impl } break; case "serial:": - if (xLaunch == "IntelEdison") + if (mLaunch == LaunchType.IntelEdison) { mDbgConnector = new DebugConnectorEdison(xPortParam, Path.ChangeExtension(mDebugInfo["ISOFile"], ".bin")); } @@ -336,7 +334,6 @@ namespace Cosmos.VS.DebugEngine.AD7.Impl break; default: throw new Exception("No debug connector found for port type '" + xPortType + "'"); - } mDbgConnector.SetConnectionHandler(DebugConnectorConnected); mDbgConnector.CmdBreak += new Action(DbgCmdBreak);