private InfrastructureArtifact GetInfrastructureArtifactForApplication(Assembly assembly,
                                                                               ApplicationArtifact application)
        {
            var typeName           = typeof(IDependOnInfrastructure <>).Name;
            var typeInterface      = application.GetType().GetInterface(typeName);
            var infrastructureType = typeInterface.GetGenericArguments().Single();

            var infrastructureInstance = assembly.CreateInstance(infrastructureType.FullName) as InfrastructureArtifact;

            return(infrastructureInstance);
        }
 private bool HasInfrastructureDefined(ApplicationArtifact application)
 {
     var typeName = typeof(IDependOnInfrastructure<>).Name;
     return application.GetType().GetInterface(typeName) != null;
 }
        private InfrastructureArtifact GetInfrastructureArtifactForApplication(Assembly assembly,
            ApplicationArtifact application)
        {
            var typeName = typeof (IDependOnInfrastructure<>).Name;
            var typeInterface = application.GetType().GetInterface(typeName);
            var infrastructureType = typeInterface.GetGenericArguments().Single();

            var infrastructureInstance = assembly.CreateInstance(infrastructureType.FullName) as InfrastructureArtifact;
            return infrastructureInstance;
        }
        private bool HasInfrastructureDefined(ApplicationArtifact application)
        {
            var typeName = typeof(IDependOnInfrastructure <>).Name;

            return(application.GetType().GetInterface(typeName) != null);
        }