protected void InitializeCommonOptions(Xml.LaunchOptions.BaseLaunchOptions source) { if (this.ExePath == null) { string exePath = source.ExePath; if (!string.IsNullOrWhiteSpace(exePath)) { this.ExePath = exePath; } } if (this.TargetArchitecture == TargetArchitecture.Unknown) { this.TargetArchitecture = ConvertTargetArchitectureAttribute(source.TargetArchitecture); } Debug.Assert((uint)MIMode.Gdb == (uint)Xml.LaunchOptions.MIMode.gdb, "Enum values don't line up!"); Debug.Assert((uint)MIMode.Lldb == (uint)Xml.LaunchOptions.MIMode.lldb, "Enum values don't line up!"); Debug.Assert((uint)MIMode.Clrdbg == (uint)Xml.LaunchOptions.MIMode.clrdbg, "Enum values don't line up!"); this.DebuggerMIMode = (MIMode)source.MIMode; if (string.IsNullOrEmpty(this.ExeArguments)) { this.ExeArguments = source.ExeArguments; } if (string.IsNullOrEmpty(this.WorkingDirectory)) { this.WorkingDirectory = source.WorkingDirectory; } if (string.IsNullOrEmpty(this.VisualizerFile)) { this.VisualizerFile = source.VisualizerFile; } this.SetupCommands = LaunchCommand.CreateCollectionFromXml(source.SetupCommands); if (source.CustomLaunchSetupCommands != null) { this.CustomLaunchSetupCommands = LaunchCommand.CreateCollectionFromXml(source.CustomLaunchSetupCommands); } Debug.Assert((uint)LaunchCompleteCommand.ExecRun == (uint)Xml.LaunchOptions.BaseLaunchOptionsLaunchCompleteCommand.execrun); Debug.Assert((uint)LaunchCompleteCommand.ExecContinue == (uint)Xml.LaunchOptions.BaseLaunchOptionsLaunchCompleteCommand.execcontinue); Debug.Assert((uint)LaunchCompleteCommand.None == (uint)Xml.LaunchOptions.BaseLaunchOptionsLaunchCompleteCommand.None); this.LaunchCompleteCommand = (LaunchCompleteCommand)source.LaunchCompleteCommand; string additionalSOLibSearchPath = source.AdditionalSOLibSearchPath; if (!string.IsNullOrEmpty(additionalSOLibSearchPath)) { if (string.IsNullOrEmpty(this.AdditionalSOLibSearchPath)) { this.AdditionalSOLibSearchPath = additionalSOLibSearchPath; } else { this.AdditionalSOLibSearchPath = string.Concat(this.AdditionalSOLibSearchPath, ";", additionalSOLibSearchPath); } } }
protected void InitializeCommonOptions(Xml.LaunchOptions.BaseLaunchOptions source) { if (this.ExePath == null) { string exePath = source.ExePath; if (!string.IsNullOrWhiteSpace(exePath)) { this.ExePath = exePath; } } if (this.TargetArchitecture == TargetArchitecture.Unknown) { this.TargetArchitecture = ConvertTargetArchitectureAttribute(source.TargetArchitecture); } Debug.Assert((uint)MIMode.Gdb == (uint)Xml.LaunchOptions.MIMode.gdb, "Enum values don't line up!"); Debug.Assert((uint)MIMode.Lldb == (uint)Xml.LaunchOptions.MIMode.lldb, "Enum values don't line up!"); Debug.Assert((uint)MIMode.Clrdbg == (uint)Xml.LaunchOptions.MIMode.clrdbg, "Enum values don't line up!"); this.DebuggerMIMode = (MIMode)source.MIMode; if (string.IsNullOrEmpty(this.ExeArguments)) this.ExeArguments = source.ExeArguments; if (string.IsNullOrEmpty(this.WorkingDirectory)) this.WorkingDirectory = source.WorkingDirectory; if (string.IsNullOrEmpty(this.VisualizerFile)) this.VisualizerFile = source.VisualizerFile; this.ShowDisplayString = source.ShowDisplayString; this.SetupCommands = LaunchCommand.CreateCollectionFromXml(source.SetupCommands); if (source.CustomLaunchSetupCommands != null) { this.CustomLaunchSetupCommands = LaunchCommand.CreateCollectionFromXml(source.CustomLaunchSetupCommands); } Debug.Assert((uint)LaunchCompleteCommand.ExecRun == (uint)Xml.LaunchOptions.BaseLaunchOptionsLaunchCompleteCommand.execrun); Debug.Assert((uint)LaunchCompleteCommand.ExecContinue == (uint)Xml.LaunchOptions.BaseLaunchOptionsLaunchCompleteCommand.execcontinue); Debug.Assert((uint)LaunchCompleteCommand.None == (uint)Xml.LaunchOptions.BaseLaunchOptionsLaunchCompleteCommand.None); this.LaunchCompleteCommand = (LaunchCompleteCommand)source.LaunchCompleteCommand; string additionalSOLibSearchPath = source.AdditionalSOLibSearchPath; if (!string.IsNullOrEmpty(additionalSOLibSearchPath)) { if (string.IsNullOrEmpty(this.AdditionalSOLibSearchPath)) this.AdditionalSOLibSearchPath = additionalSOLibSearchPath; else this.AdditionalSOLibSearchPath = string.Concat(this.AdditionalSOLibSearchPath, ";", additionalSOLibSearchPath); } }