Ejemplo n.º 1
0
        public static TerminalLauncher MakeTerminal(string title, string initScript, ReadOnlyCollection<EnvironmentEntry> environment)
        {
            TerminalLauncher terminal = null;
            if (PlatformUtilities.IsLinux())
            {
                terminal = new LinuxTerminalLauncher(title, initScript, environment);
            }
            else if (PlatformUtilities.IsOSX())
            {
                terminal = new MacTerminalLauncher(title, initScript, environment);
            }
            else
            {
                Debug.Fail("Cannot make a terminal for non Linux or OS X.");
                throw new InvalidOperationException();
            }

            return terminal;
        }
Ejemplo n.º 2
0
        public static TerminalLauncher MakeTerminal(string title, string initScript, ReadOnlyCollection <EnvironmentEntry> environment)
        {
            TerminalLauncher terminal = null;

            if (PlatformUtilities.IsLinux())
            {
                terminal = new LinuxTerminalLauncher(title, initScript, environment);
            }
            else if (PlatformUtilities.IsOSX())
            {
                terminal = new MacTerminalLauncher(title, initScript, environment);
            }
            else
            {
                Debug.Fail("Cannot make a terminal for non Linux or OS X.");
                throw new InvalidOperationException();
            }

            return(terminal);
        }