public static AppDomainSetup CreateAppDomainSetup(MixerParameters parameters)
        {
            ArgumentUtility.CheckNotNull("parameters", parameters);

            var setup = new AppDomainSetup
            {
                ApplicationName = "Mixer",
                ApplicationBase = parameters.BaseDirectory
            };

            if (!string.IsNullOrEmpty(parameters.ConfigFile))
            {
                setup.ConfigurationFile = parameters.ConfigFile;
                if (!File.Exists(setup.ConfigurationFile))
                {
                    throw new FileNotFoundException(
                              string.Format(
                                  "The configuration file supplied by the 'config' parameter was not found.\r\nFile: {0}",
                                  setup.ConfigurationFile),
                              setup.ConfigurationFile);
                }
            }
            return(setup);
        }
 public MixerRunner(MixerParameters parameters)
     : base(CreateAppDomainSetup(ArgumentUtility.CheckNotNull("parameters", parameters)))
 {
     _parameters = parameters;
 }