Ejemplo n.º 1
0
 public AdminController(IOrchardServices services, IImportExportService importExportService, IContentDefinitionManager contentDefinitionManager)
 {
     _importExportService      = importExportService;
     _contentDefinitionManager = contentDefinitionManager;
     Services = services;
     T        = NullLocalizer.Instance;
 }
Ejemplo n.º 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>();
        }
Ejemplo n.º 4
0
 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));
     }
Ejemplo n.º 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();
        }
Ejemplo n.º 7
0
 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;
 }
Ejemplo n.º 8
0
 public CompanyOrderService(ICompanyOrderRepository companyOrderRepository, IImportExportService importExportService,
                            IHealthResultRepository healthResultRepository
                            , IEmailService emailService)
 {
     _companyOrderRepository = companyOrderRepository;
     _importExportService    = importExportService;
     _healthResultRepository = healthResultRepository;
     _emailService           = emailService;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 10
0
 public EmployeeWorkHistoryService(IEmployeeWorkHistoryRepository employeeWorkHistoryRepository,
                                   IEmployeeBaseInfoRepository employeeBaseInfoRepository, IWorkContext workContext,
                                   IImportExportService importExportService)
 {
     this._employeeWorkHistoryRepository = employeeWorkHistoryRepository;
     this._employeeBaseInfoRepository    = employeeBaseInfoRepository;
     this._workContext         = workContext;
     this._importExportService = importExportService;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 15
0
        public DefaultContentExportService(IImportExportService importExportService, IContentManager contentManager, ICustomExportStep customExportStep, IOrchardServices orchardServices)
        {
            _importExportService = importExportService;
            _contentManager      = contentManager;
            _customExportStep    = customExportStep;
            _orchardServices     = orchardServices;

            Logger = NullLogger.Instance;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 18
0
 public AdminController(
     IOrchardServices services, 
     IImportExportService importExportService, 
     IContentDefinitionManager contentDefinitionManager,
     ICustomExportStep customExportStep
     ) {
     _importExportService = importExportService;
     _contentDefinitionManager = contentDefinitionManager;
     _customExportStep = customExportStep;
     Services = services;
     T = NullLocalizer.Instance;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 25
0
 public MSDS_SpecificationCheckService(IMSDS_SpecificationCheckRepository msds_SpecificationCheckRepository, IImportExportService importExportService)
 {
     _msds_SpecificationCheckRepository = msds_SpecificationCheckRepository;
     _importExportService = importExportService;
 }
Ejemplo n.º 26
0
 public ImportExportController(
     IImportExportService importExportService)
 {
     _importExportService = importExportService;
 }
Ejemplo n.º 27
0
 public ImportController()
 {
     _exportService = new ImportExportService();
 }
Ejemplo n.º 28
0
 public ImportExportCommands(IImportExportService importExportService) {
     _importExportService = importExportService;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 33
0
 public ImportExportCommands(IImportExportService importExportService)
 {
     _importExportService = importExportService;
 }