static DefaultPlatform()
        {
            var assembly        = Assembly.GetEntryAssembly();
            var assemblyCatalog = new DependencyContextAssemblyCatalog(assembly);

            Instance = new DefaultPlatform(assemblyCatalog);
        }
Example #2
0
        private static IEnumerable <Assembly> GetNancyReferencingAssemblies()
        {
#if CORE
            var assemblyCatalog =
                new DependencyContextAssemblyCatalog();

            return(assemblyCatalog.GetAssemblies());
#else
            return(AppDomain.CurrentDomain.GetAssemblies().Where(IsNancyReferencing).Where(assembly => !assembly.ReflectionOnly));
#endif
        }
        private static IEnumerable<Assembly> GetNancyReferencingAssemblies()
        {
#if CORE
            var assemblyCatalog =
                new DependencyContextAssemblyCatalog();

            return assemblyCatalog.GetAssemblies();
#else
            return AppDomain.CurrentDomain.GetAssemblies().Where(IsNancyReferencing).Where(assembly => !assembly.ReflectionOnly);
#endif
        }
Example #4
0
        public NancyInternalConfigurationFixture()
        {
            IAssemblyCatalog assemblyCatalog;

#if CORE
            assemblyCatalog = new DependencyContextAssemblyCatalog();
#else
            assemblyCatalog = null; // new AppDomainAssemblyCatalog(); TODO: This needs fixed!
#endif

            this.typeCatalog = new DefaultTypeCatalog(assemblyCatalog);
        }
        public NancyInternalConfigurationFixture()
        {
            IAssemblyCatalog assemblyCatalog;

#if !CORE
            assemblyCatalog = new AppDomainAssemblyCatalog();
#else
            assemblyCatalog = new DependencyContextAssemblyCatalog();
#endif

            this.typeCatalog = new DefaultTypeCatalog(assemblyCatalog);
        }
Example #6
0
        public NancyInternalConfigurationFixture()
        {
            IAssemblyCatalog assemblyCatalog;

#if !CORE
            assemblyCatalog = new AppDomainAssemblyCatalog();
#else
            assemblyCatalog = new DependencyContextAssemblyCatalog();
#endif

            this.typeCatalog = new DefaultTypeCatalog(assemblyCatalog);
        }