Exemple #1
0
        public IEnvironmentLifecycle ForType(AssemblyName assemblyName, string typeName)
        {
            foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
            {
                if (assembly.GetName().FullName.Equals(assemblyName.FullName))
                {
                    var type = assembly.GetType(typeName);

                    if (type != null)
                    {
                        var env = Environments.ForType(type);

                        Console.WriteLine("Starting {0}", env.GetType().FullName);

                        return(new RemoteEnvironmentLifecycle(env));
                    }
                }
            }

            return(null);
        }
Exemple #2
0
 public AggregatedEnvironments(IEnumerable <Type> environmentTypes)
 {
     environments = environmentTypes.Select(envType => Environments.GetEnvironment(envType)).ToList();
 }