示例#1
0
        ServerParameters GetListenParameters()
        {
            var address = Settings.ListenAddress;

            if (string.IsNullOrEmpty(address))
            {
                throw new AlertException("Must set Listen Address in Settings Dialog.");
            }

            var endpoint = ParseEndPoint(address);

            return(ServerParameters.WaitForConnection(endpoint));
        }
示例#2
0
        ServerParameters GetIOSParameters()
        {
            var address = Settings.IOSEndpoint;

            if (string.IsNullOrEmpty(address))
            {
                throw new AlertException("Must set iOS Endpoint in Settings Dialog.");
            }

            var endpoint = ParseEndPoint(address);

            return(ServerParameters.IOS(endpoint));
        }
示例#3
0
        ServerParameters GetLocalParameters()
        {
            var pipeArgs = new PipeArguments();

            pipeArgs.MonoPrefix = Settings.MonoRuntime;
            if (string.IsNullOrEmpty(pipeArgs.MonoPrefix))
            {
                throw new AlertException("Must set Mono Runtime in Settings Dialog.");
            }

            var monoPath = Path.Combine(pipeArgs.MonoPrefix, "bin", "mono");

            if (!File.Exists(monoPath))
            {
                throw new AlertException("Invalid runtime prefix: {0}", pipeArgs.MonoPrefix);
            }

            var launcherPath = Settings.LauncherPath;

            if (!string.IsNullOrEmpty(launcherPath))
            {
                pipeArgs.ConsolePath = FindFile(launcherPath);
            }

            var assembly = Settings.TestSuite;

            if (string.IsNullOrEmpty(assembly))
            {
                throw new AlertException("Must set Test Suite in Settings Dialog.");
            }
            pipeArgs.Assembly       = FindFile(assembly);
            pipeArgs.ExtraArguments = Settings.Arguments;

            var address = Settings.ListenAddress;

            if (string.IsNullOrEmpty(address))
            {
                throw new AlertException("Must set Listen Address in Settings Dialog.");
            }

            var endpoint = ParseEndPoint(address);

            return(ServerParameters.CreatePipe(endpoint, pipeArgs));
        }