예제 #1
0
 public AdminController(IOrchardServices services, IImportExportService importExportService, IContentDefinitionManager contentDefinitionManager)
 {
     _importExportService      = importExportService;
     _contentDefinitionManager = contentDefinitionManager;
     Services = services;
     T        = NullLocalizer.Instance;
 }
예제 #2
0
        public void Init()
        {
            var builder = new ContainerBuilder();

            builder.RegisterType <ImportExportService>().As <IImportExportService>();
            builder.RegisterType <StubShellDescriptorManager>().As <IShellDescriptorManager>();
            builder.RegisterType <RecipeManager>().As <IRecipeManager>();
            builder.RegisterType <RecipeHarvester>().As <IRecipeHarvester>();
            builder.RegisterType <RecipeStepExecutor>().As <IRecipeStepExecutor>();
            builder.RegisterType <StubStepQueue>().As <IRecipeStepQueue>().InstancePerLifetimeScope();
            builder.RegisterType <StubRecipeScheduler>().As <IRecipeScheduler>();
            builder.RegisterType <ExtensionManager>().As <IExtensionManager>();
            builder.RegisterType <StubAppDataFolder>().As <IAppDataFolder>();
            builder.RegisterType <StubClock>().As <IClock>();
            builder.RegisterType <StubCacheManager>().As <ICacheManager>();
            builder.RegisterType <ExtensionManagerTests.StubLoaders>().As <IExtensionLoader>();
            builder.RegisterType <RecipeParser>().As <IRecipeParser>();
            builder.RegisterType <StubWebSiteFolder>().As <IWebSiteFolder>();
            builder.RegisterType <CustomRecipeHandler>().As <IRecipeHandler>();
            builder.RegisterType <DefaultContentManager>().As <IContentManager>();
            builder.RegisterType <ContentDefinitionManager>().As <IContentDefinitionManager>();
            builder.RegisterType <ContentDefinitionWriter>().As <IContentDefinitionWriter>();
            builder.RegisterType <StubOrchardServices>().As <IOrchardServices>();
            builder.RegisterType <StubAppDataFolder>().As <IAppDataFolder>();
            builder.RegisterType <Signals>().As <ISignals>();
            builder.RegisterGeneric(typeof(Repository <>)).As(typeof(IRepository <>));
            builder.RegisterInstance(new Mock <ISettingsFormatter>().Object);
            builder.RegisterInstance(new Mock <IRecipeExecuteEventHandler>().Object);
            _session = _sessionFactory.OpenSession();
            builder.RegisterInstance(new TestTransactionManager(_session)).As <ITransactionManager>();

            _container           = builder.Build();
            _importExportService = _container.Resolve <IImportExportService>();
        }
        public void Init() {
            var builder = new ContainerBuilder();
            builder.RegisterType<ImportExportService>().As<IImportExportService>();
            builder.RegisterType<StubShellDescriptorManager>().As<IShellDescriptorManager>();
            builder.RegisterType<RecipeManager>().As<IRecipeManager>();
            builder.RegisterType<RecipeHarvester>().As<IRecipeHarvester>();
            builder.RegisterType<RecipeStepExecutor>().As<IRecipeStepExecutor>();
            builder.RegisterType<StubStepQueue>().As<IRecipeStepQueue>().InstancePerLifetimeScope();
            builder.RegisterType<StubRecipeJournal>().As<IRecipeJournal>();
            builder.RegisterType<StubRecipeScheduler>().As<IRecipeScheduler>();
            builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
            builder.RegisterType<StubAppDataFolder>().As<IAppDataFolder>();
            builder.RegisterType<StubClock>().As<IClock>();
            builder.RegisterType<StubCacheManager>().As<ICacheManager>();
            builder.RegisterType<ExtensionManagerTests.StubLoaders>().As<IExtensionLoader>();
            builder.RegisterType<RecipeParser>().As<IRecipeParser>();
            builder.RegisterType<StubWebSiteFolder>().As<IWebSiteFolder>();
            builder.RegisterType<CustomRecipeHandler>().As<IRecipeHandler>();
            builder.RegisterType<DefaultContentManager>().As<IContentManager>();
            builder.RegisterType<ContentDefinitionManager>().As<IContentDefinitionManager>();
            builder.RegisterType<ContentDefinitionWriter>().As<IContentDefinitionWriter>();
            builder.RegisterType<StubOrchardServices>().As<IOrchardServices>();
            builder.RegisterType<StubAppDataFolder>().As<IAppDataFolder>();
            builder.RegisterType<Signals>().As<ISignals>();
            builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
            builder.RegisterInstance(new Mock<ISettingsFormatter>().Object);
            _session = _sessionFactory.OpenSession();
            builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();

            _container = builder.Build();
            _importExportService = _container.Resolve<IImportExportService>();
        }
 public AdminController(IContentManager contentManager,
     IOrchardServices services,
     IShapeFactory shapeFactory,
     IContentDefinitionManager contentDefinitionManager,
     IRemoteContentFetchService remoteContentFetchService,
     ISynchronisationMapFactory synchronisationMapFactory,
     IRepository<ContentSyncSettings> contentSyncSettingsRepository,
     ISignals signals,
     ILoggerFactory loggerFactory,
     ICacheManager cacheManager,
     IImportExportService importExportService,
     IRecipeParser recipeParser,
     IRemoteImportService remoteImportService,
     IEnumerable<IHardComparer> hardComparers, 
     IEnumerable<ISoftComparer> softComparers) {
     _contentManager = contentManager;
     _services = services;
     _shapeFactory = shapeFactory;
     _contentDefinitionManager = contentDefinitionManager;
     _remoteContentFetchService = remoteContentFetchService;
     _synchronisationMapFactory = synchronisationMapFactory;
     _contentSyncSettingsRepository = contentSyncSettingsRepository;
     _signals = signals;
     _loggerFactory = loggerFactory;
     _cacheManager = cacheManager;
     _importExportService = importExportService;
     _recipeParser = recipeParser;
     _remoteImportService = remoteImportService;
     _hardComparers = hardComparers;
     _softComparers = softComparers;
     Logger = loggerFactory.CreateLogger(typeof (AdminController));
     }
예제 #5
0
        //private readonly IRecipeJournal _recipeJournal;

        public RecipeContentMigrationProvider(IFeatureManager featureManager, IVirtualPathProvider virtualPathProvider, IImportExportService importExportService /*, IRecipeJournal recipeJournal*/)
        {
            _featureManager      = featureManager;
            _virtualPathProvider = virtualPathProvider;
            _importExportService = importExportService;
            //_recipeJournal = recipeJournal;
        }
        public ImportExportServiceTests()
        {
            Host.Run(new[] { "install y" }).Wait();

            Scaffold.Run();

            _importExportService = new ImportExportService();
        }
예제 #7
0
파일: TagController.cs 프로젝트: junlu3/CMS
 public TagController(IMSDS_SpecificationService specificationService, IMSDS_HazardousSubstancesService hazardousSubstancesService, IMSDS_H_StatementService h_StatementService, IMSDS_P_StatementService p_StatementService, IImportExportService importExportService)
 {
     _specificationService       = specificationService;
     _hazardousSubstancesService = hazardousSubstancesService;
     _h_StatementService         = h_StatementService;
     _p_StatementService         = p_StatementService;
     _importExportService        = importExportService;
 }
예제 #8
0
 public CompanyOrderService(ICompanyOrderRepository companyOrderRepository, IImportExportService importExportService,
                            IHealthResultRepository healthResultRepository
                            , IEmailService emailService)
 {
     _companyOrderRepository = companyOrderRepository;
     _importExportService    = importExportService;
     _healthResultRepository = healthResultRepository;
     _emailService           = emailService;
 }
예제 #9
0
        public static string Import(this IImportExportService service, string recipeText)
        {
            var context = new ImportActionContext {
                RecipeDocument = XDocument.Parse(recipeText, LoadOptions.PreserveWhitespace)
            };

            service.Import(context);
            return(context.ExecutionId);
        }
예제 #10
0
 public EmployeeWorkHistoryService(IEmployeeWorkHistoryRepository employeeWorkHistoryRepository,
                                   IEmployeeBaseInfoRepository employeeBaseInfoRepository, IWorkContext workContext,
                                   IImportExportService importExportService)
 {
     this._employeeWorkHistoryRepository = employeeWorkHistoryRepository;
     this._employeeBaseInfoRepository    = employeeBaseInfoRepository;
     this._workContext         = workContext;
     this._importExportService = importExportService;
 }
예제 #11
0
        //private readonly IRecipeJournal _recipeJournal;

        public DefaultContentSyncService(IRepository <RemoteSiteConfigRecord> remoteConfigRepository, IClock clock, IImportExportService importExportService /*, IRecipeJournal recipeJournal*/)
        {
            _remoteConfigRepository = remoteConfigRepository;
            _clock = clock;
            _importExportService = importExportService;
            //_recipeJournal = recipeJournal;

            Logger = NullLogger.Instance;
        }
        public ImportExportServiceTests()
        {
            Host.Run(new[] { "install y" }).Wait();
            Scaffold.Tables();

            _context = Scaffold.EnsureContext();

            _importExportService = new ImportExportService();
        }
        public DefaultContentExportService(IImportExportService importExportService, IContentManager contentManager, ICustomExportStep customExportStep, IOrchardServices orchardServices)
        {
            _importExportService = importExportService;
            _contentManager = contentManager;
            _customExportStep = customExportStep;
            _orchardServices = orchardServices;

            Logger = NullLogger.Instance;
        }
        public DefaultContentSyncService(IRepository<RemoteSiteConfigRecord> remoteConfigRepository, IClock clock, IImportExportService importExportService, IRecipeJournal recipeJournal)
        {
            _remoteConfigRepository = remoteConfigRepository;
            _clock = clock;
            _importExportService = importExportService;
            _recipeJournal = recipeJournal;

            Logger = NullLogger.Instance;
        }
예제 #15
0
        public DefaultContentExportService(IImportExportService importExportService, IContentManager contentManager, ICustomExportStep customExportStep, IOrchardServices orchardServices)
        {
            _importExportService = importExportService;
            _contentManager      = contentManager;
            _customExportStep    = customExportStep;
            _orchardServices     = orchardServices;

            Logger = NullLogger.Instance;
        }
예제 #16
0
        public ExportController(ILeaderboardService leaderboardService, IImportExportService importExportService)
        {
            _leaderboardService  = leaderboardService;
            _importExportService = importExportService;

            _path = Path.Combine(Path.GetTempPath(), "ExportedExcelFiles");
            if (!Directory.Exists(_path))
            {
                Directory.CreateDirectory(_path);
            }
        }
 public ImportExportCommands(
     IImportExportService importExportService,
     IContentDefinitionManager contentDefinitionManager,
     ISiteService siteService,
     IMembershipService membershipService,
     IAuthenticationService authenticationService) {
     _importExportService = importExportService;
     _contentDefinitionManager = contentDefinitionManager;
     _siteService = siteService;
     _membershipService = membershipService;
     _authenticationService = authenticationService;
 }
예제 #18
0
 public AdminController(
     IOrchardServices services, 
     IImportExportService importExportService, 
     IContentDefinitionManager contentDefinitionManager,
     ICustomExportStep customExportStep
     ) {
     _importExportService = importExportService;
     _contentDefinitionManager = contentDefinitionManager;
     _customExportStep = customExportStep;
     Services = services;
     T = NullLocalizer.Instance;
 }
예제 #19
0
        //private MembershipUser _currentUser;
        #endregion

        #region Ctor

        public CompanyEmployeeService(ICompanyEmployeeRepository companyEmployeeRepository, ICategoryRepository categoryRepository,
                                      IWorkContext workContext, IEmployeeBaseInfoRepository employeeBaseInfoRepository, IImportExportService importExportService,
                                      ICompanyService companyService, IEmployeeWorkHistoryService employeeWorkHistoryService)
        {
            _companyEmployeeRepository  = companyEmployeeRepository;
            _employeeBaseInfoRepository = employeeBaseInfoRepository;
            _categoryRepository         = categoryRepository;
            _workContext                = workContext;
            _importExportService        = importExportService;
            _companyService             = companyService;
            _employeeWorkHistoryService = employeeWorkHistoryService;
        }
예제 #20
0
 public HealthResultService(IHealthResultRepository healthResultRepository
                            , IWorkContext workContext
                            , IImportExportService importExportService
                            , IEmployeeBaseInfoRepository employeeBaseInfoRepository
                            , ICompanyEmployeeRepository companyEmployeeRepository
                            , ICompanyRepository companyRepository
                            )
 {
     _healthResultRepository     = healthResultRepository;
     _workContext                = workContext;
     _importExportService        = importExportService;
     _employeeBaseInfoRepository = employeeBaseInfoRepository;
     _companyEmployeeRepository  = companyEmployeeRepository;
     _companyRepository          = companyRepository;
 }
예제 #21
0
 public ImportExportCommands(
     IImportExportService importExportService,
     IContentDefinitionManager contentDefinitionManager,
     ISiteService siteService,
     IMembershipService membershipService,
     IAuthenticationService authenticationService,
     IEnumerable <IExportAction> exportActions)
 {
     _importExportService      = importExportService;
     _contentDefinitionManager = contentDefinitionManager;
     _siteService           = siteService;
     _membershipService     = membershipService;
     _authenticationService = authenticationService;
     _exportActions         = exportActions;
 }
예제 #22
0
 public AdminController(
     IOrchardServices services,
     IImportExportService importExportService,
     IContentDefinitionManager contentDefinitionManager,
     ICustomExportStep customExportStep,
     IRecipeJournal recipeJournal
     )
 {
     _importExportService      = importExportService;
     _contentDefinitionManager = contentDefinitionManager;
     _customExportStep         = customExportStep;
     _recipeJournal            = recipeJournal;
     Services = services;
     T        = NullLocalizer.Instance;
 }
예제 #23
0
 public ImportExportCommands(
     IImportExportService importExportService,
     IContentDefinitionManager contentDefinitionManager,
     ISiteService siteService,
     IMembershipService membershipService,
     IAuthenticationService authenticationService,
     IEnumerable<IExportAction> exportActions)
 {
     _importExportService = importExportService;
     _contentDefinitionManager = contentDefinitionManager;
     _siteService = siteService;
     _membershipService = membershipService;
     _authenticationService = authenticationService;
     _exportActions = exportActions;
 }
 public AdminController(
     IOrchardServices services,
     IImportExportService importExportService,
     IRecipeResultAccessor recipeResultAccessor,
     IEnumerable <IExportAction> exportActions,
     IEnumerable <IImportAction> importActions,
     IRecipeParser recipeParser)
 {
     _importExportService  = importExportService;
     _recipeResultAccessor = recipeResultAccessor;
     _exportActions        = exportActions;
     _importActions        = importActions;
     _recipeParser         = recipeParser;
     Services = services;
     T        = NullLocalizer.Instance;
 }
예제 #25
0
 public MSDS_SpecificationCheckService(IMSDS_SpecificationCheckRepository msds_SpecificationCheckRepository, IImportExportService importExportService)
 {
     _msds_SpecificationCheckRepository = msds_SpecificationCheckRepository;
     _importExportService = importExportService;
 }
예제 #26
0
 public ImportExportController(
     IImportExportService importExportService)
 {
     _importExportService = importExportService;
 }
예제 #27
0
 public ImportController()
 {
     _exportService = new ImportExportService();
 }
예제 #28
0
 public ImportExportCommands(IImportExportService importExportService) {
     _importExportService = importExportService;
 }
예제 #29
0
 /// <summary>
 /// Register the import export service.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="ioService"></param>
 public void Register <T>(IImportExportService ioService) where T : class, new()
 {
     _ioServices[typeof(T).FullName]      = ioService;
     _ioServicesShortName[typeof(T).Name] = ioService;
 }
 public ExportSpecificService(IImportExportService importExportService, IRecipeBuilder recipeBuilder, ISpecificContentStep specificContentStep)
 {
     _importExportService = importExportService;
     _recipeBuilder       = recipeBuilder;
     _specificContentStep = specificContentStep;
 }
 public RecipeContentMigrationProvider(IFeatureManager featureManager, IVirtualPathProvider virtualPathProvider, IImportExportService importExportService, IRecipeJournal recipeJournal) {
     _featureManager = featureManager;
     _virtualPathProvider = virtualPathProvider;
     _importExportService = importExportService;
     _recipeJournal = recipeJournal;
 }
예제 #32
0
 /// <summary>
 /// ImportExportServiceController ctors
 /// </summary>
 /// <param name="importExportService"></param>
 /// <param name="securityContext"></param>
 public ImportExportServiceController(ITraceManager traceManager, IImportExportService importExportService, ISecurityContext securityContext)
 {
     _traceManager        = traceManager;
     _importExportService = importExportService;
     _securityContext     = securityContext;
 }
예제 #33
0
 public ImportExportCommands(IImportExportService importExportService)
 {
     _importExportService = importExportService;
 }