public static IDictionary<string, object> SelectPlatform(this HostConfigurator configurator, Action<CommandLineParameterBuilder> customParameters = null)
        {
            IDictionary<string, object> parameterValues = null;

            if (customParameters != null)
            {
                var parameterBuilder = new CommandLineParameterBuilder(configurator);
                customParameters(parameterBuilder);

                parameterValues = parameterBuilder.GeteParameterValues();
            }

            if (MonoHelper.RunninOnLinux)
            {
                configurator.UseEnvironmentBuilder(c => new LinuxHostEnvironmentBuilderImpl(c, parameterValues));
            }
            else
            {
                configurator.UseEnvironmentBuilder(c => new WindowsHostEnvironmentBuilderImpl(c, parameterValues));
            }

            return parameterValues;
        }
Esempio n. 2
0
        public static IDictionary <string, object> SelectPlatform(this HostConfigurator configurator, Action <CommandLineParameterBuilder> customParameters = null)
        {
            IDictionary <string, object> parameterValues = null;

            if (customParameters != null)
            {
                var parameterBuilder = new CommandLineParameterBuilder(configurator);
                customParameters(parameterBuilder);

                parameterValues = parameterBuilder.GeteParameterValues();
            }

            if (MonoHelper.RunninOnLinux)
            {
                configurator.UseEnvironmentBuilder(c => new LinuxHostEnvironmentBuilderImpl(c, parameterValues));
            }
            else
            {
                configurator.UseEnvironmentBuilder(c => new WindowsHostEnvironmentBuilderImpl(c, parameterValues));
            }

            return(parameterValues);
        }