Ejemplo n.º 1
0
        /// <summary>
        /// 从程序集中获取可用的服务类型。
        /// </summary>
        /// <param name="serviceTypeHarvester">服务类型收集者。</param>
        /// <param name="assembly">程序集。</param>
        /// <returns>可用的服务类型。</returns>
        public static Type[] GetTypes(this IServiceTypeHarvester serviceTypeHarvester, Assembly assembly)
        {
            serviceTypeHarvester.NotNull("serviceTypeHarvester");
            assembly.NotNull("assembly");

            return(serviceTypeHarvester.GeTypes(assembly.GetTypes()));
        }
Ejemplo n.º 2
0
        public DefaultCompositionStrategy(IExtensionManager extensionManager, IServiceTypeHarvester serviceTypeHarvester, IEnumerable <ICompositionStrategyProvider> compositionStrategyProviders)
        {
            _extensionManager             = extensionManager;
            _serviceTypeHarvester         = serviceTypeHarvester;
            _compositionStrategyProviders = compositionStrategyProviders;

            Logger = NullLogger.Instance;
        }
Ejemplo n.º 3
0
        public EntityFrameworkDbContextFactory(IServiceTypeHarvester serviceTypeHarvester, IEnumerable <IEntityFrameworkDataServicesProvider> dataServicesProviders, IEnumerable <IMapping> mappings, ShellBlueprint shellBlueprint)
        {
            _serviceTypeHarvester  = serviceTypeHarvester;
            _dataServicesProviders = dataServicesProviders;
            _mappings         = mappings;
            _recordBlueprints = shellBlueprint.GetRecords();
            _shellSettings    = shellBlueprint.Settings;

            Logger = NullLogger.Instance;
        }
Ejemplo n.º 4
0
 public DefaultExtensionManager(
     IEnumerable <IExtensionFolders> folders,
     ICacheManager cacheManager,
     IParallelCacheContext parallelCacheContext,
     IEnumerable <IExtensionDescriptorFilter> extensionDescriptorFilters,
     IEnumerable <IFeatureDescriptorFilter> featureDescriptorFilters,
     IAsyncTokenProvider asyncTokenProvider,
     Lazy <IEnumerable <IExtensionLoader> > loaders,
     IServiceTypeHarvester serviceTypeHarvester)
 {
     _folders                    = folders;
     _cacheManager               = cacheManager;
     _parallelCacheContext       = parallelCacheContext;
     _extensionDescriptorFilters = extensionDescriptorFilters;
     _featureDescriptorFilters   = featureDescriptorFilters;
     _asyncTokenProvider         = asyncTokenProvider;
     _loaders                    = loaders;
     _serviceTypeHarvester       = serviceTypeHarvester;
     T      = NullLocalizer.Instance;
     Logger = NullLogger.Instance;
 }
 public DefaultExtensionManager(
     IEnumerable<IExtensionFolders> folders,
     ICacheManager cacheManager,
     IParallelCacheContext parallelCacheContext,
     IEnumerable<IExtensionDescriptorFilter> extensionDescriptorFilters,
     IEnumerable<IFeatureDescriptorFilter> featureDescriptorFilters,
     IAsyncTokenProvider asyncTokenProvider,
     Lazy<IEnumerable<IExtensionLoader>> loaders,
     IServiceTypeHarvester serviceTypeHarvester)
 {
     _folders = folders;
     _cacheManager = cacheManager;
     _parallelCacheContext = parallelCacheContext;
     _extensionDescriptorFilters = extensionDescriptorFilters;
     _featureDescriptorFilters = featureDescriptorFilters;
     _asyncTokenProvider = asyncTokenProvider;
     _loaders = loaders;
     _serviceTypeHarvester = serviceTypeHarvester;
     T = NullLocalizer.Instance;
     Logger = NullLogger.Instance;
 }
        public EntityFrameworkDbContextFactory(IServiceTypeHarvester serviceTypeHarvester, IEnumerable<IEntityFrameworkDataServicesProvider> dataServicesProviders, IEnumerable<IMapping> mappings, ShellBlueprint shellBlueprint)
        {
            _serviceTypeHarvester = serviceTypeHarvester;
            _dataServicesProviders = dataServicesProviders;
            _mappings = mappings;
            _recordBlueprints = shellBlueprint.GetRecords();
            _shellSettings = shellBlueprint.Settings;

            Logger = NullLogger.Instance;
        }