public EnginesController(IAuthorizationService authService, IEngineRepository engines, IEngineService engineService) { _authService = authService; _engines = engines; _engineService = engineService; }
public BuildsController(IBuildRepository buildRepo, IEngineRepository engineRepo, EngineService engineService, IOptions <EngineOptions> options) { _buildRepo = buildRepo; _engineService = engineService; _options = options; }
public TItem TryLocateItem(IEngineRepository <TItem> navRepository, object findValue) { TValue convertedValue = ConversionUtility.ConvertValue <TValue>(findValue); var predicate = IdentifierExpressionHelpers.GetIdentifierPredicate(_getLocatorValueExpression, convertedValue); return(navRepository.GetAllItems().Where(predicate).SingleOrDefault()); }
public FlatFileWriter(IUnitOfWork uow, IEngineRepository enginRepo, ILogger <EngineElement> logger, IMessageService messageService) : base(uow, enginRepo, logger, messageService) { // Register element properties RegisterInputProperties("TargetFilePath", "", DataType.VirtualPath, true); RegisterInputProperties("ColumnDelimiter", "", DataType.Char, true); RegisterInputProperties("Table", "", DataType.Table, true); }
public CreatableItem(IEngineRepository <TItem> navRepository) : base(null, navRepository) { _navRepository = navRepository; Query = Enumerable.Empty <TItem>().SingleDefferred(); }
public FullEngineContext(IDataTransaction transaction, IEngineRepository <TItem> repository, [NotNull] IEngineSubContext <TItem> subContext) { Transaction = transaction; Repository = repository; _subContext = subContext; }
public SqlTableWriter(IUnitOfWork uow, IEngineRepository enginRepo, ILogger <EngineElement> logger, IMessageService messageService) : base(uow, enginRepo, logger, messageService) { // Register element properties RegisterInputProperties("ConnectionString", "Sql Server Connection String", DataType.String, true); RegisterInputProperties("SqlTable", "Sql destination table", DataType.String, true); RegisterInputProperties("ColumnsMapping", "Columns Mapping", DataType.Collection); RegisterInputProperties("SourceTable", "Source TableValue", DataType.Table, true); }
public FirstController(RoleManager <IdentityRole> roleManager, UserManager <IdentityUser> userManager, IEngineRepository engineRepository) { this.roleManager = roleManager; this.userManager = userManager; this.engineRepository = engineRepository; }
public BuildsController(IAuthorizationService authService, IBuildRepository builds, IEngineRepository engines, IEngineService engineService, IOptions <EngineOptions> engineOptions) { _authService = authService; _builds = builds; _engines = engines; _engineService = engineService; _engineOptions = engineOptions; }
public SqlQueryReader(IUnitOfWork uow, IEngineRepository enginRepo, ILogger <EngineElement> logger, IMessageService messageService, ISqlValidationService sqlValidationService) : base(uow, enginRepo, logger, messageService) { this.sqlValidationService = sqlValidationService; // Register element properties RegisterInputProperties("ConnectionString", "Sql Server Connection String", DataType.String, true); RegisterInputProperties("SqlQuery", "SqL Query", DataType.String, true); RegisterOutputProperties("Table", "Rows imported from Sql Query", DataType.Table, true); }
public PlanEngineAppService(IPlanEngineQuery planEngineQuery, IAirlinesRepository airlinesRepository, IEngineRepository engineRepository, IEngineTypeRepository engineTypeRepository, IPlanEngineRepository planEngineRepository) { _planEngineQuery = planEngineQuery; _airlinesRepository = airlinesRepository; _engineRepository = engineRepository; _engineTypeRepository = engineTypeRepository; _planEngineRepository = planEngineRepository; }
public AdminEnginesService( IEngineRepository engineRepository, IAdminCommonDeleteService adminDeleteService, IAdminCommonEditService adminEditService, IAdminCommonCreateService adminCreateService) { this.engineRepository = engineRepository; this.adminDeleteService = adminDeleteService; this.adminEditService = adminEditService; this.adminCreateService = adminCreateService; }
public EnginesController( IAdminEnginesService enginesService, ICookiesService cookiesService, IEngineRepository engineRepository, IAdminTransmissionsService adminTransmissionsService) { this.enginesService = enginesService; this.cookiesService = cookiesService; this.engineRepository = engineRepository; this.adminTransmissionsService = adminTransmissionsService; }
public FlatFileReader(IUnitOfWork uow, IEngineRepository enginRepo, ILogger <EngineElement> logger, IMessageService messageService) : base(uow, enginRepo, logger, messageService) { //RegisterInputProperties("SourceFilePath", "Source file path", DataType.String, true); RegisterInputProperties("SourceFilePath", "Source file path", DataType.VirtualPath, true); RegisterInputProperties("SkipStartingDataRows", "Starting row to skip", DataType.Int); RegisterInputProperties("FirstRowHasHeader", "Using first row as header", DataType.Bool, true); RegisterInputProperties("ColumnDelimiter", "Column char delimiter", DataType.Char, true); RegisterInputProperties("LimitToRows", "Limit result rows", DataType.Int); RegisterOutputProperties("Table", "Rows imported from flat file", DataType.Table, true); }
public EngineAppService(IEngineQuery engineQuery, IActionCategoryRepository actionCategoryRepository, IAirlinesRepository airlinesRepository, IEngineRepository engineRepository, IEngineTypeRepository engineTypeRepository, ISupplierRepository supplierRepository) { _engineQuery = engineQuery; _actionCategoryRepository = actionCategoryRepository; _airlinesRepository = airlinesRepository; _engineRepository = engineRepository; _engineTypeRepository = engineTypeRepository; _supplierRepository = supplierRepository; }
public TItem TryLocateItem(IEngineRepository <TItem> navRepository, object findValue) { throw new NotImplementedException("Not got this far yet."); // Not sure what to do here. Stem method can't accept a repository. object loadedParentItem = null; var ret = _instanceMethod.DynamicInvoke(findValue, loadedParentItem); return((TItem)ret); }
public IdentifiedItem(string identifier, IEngineRepository <TItem> repository, IIdentifierInfo <TItem> identifierInfo) : base(identifier, repository) { _repository = repository; _identifierInfo = identifierInfo; IQueryable <TItem> items = _repository.GetAllItems(); Expression <Func <TItem, bool> > identifierPredicate = _identifierInfo.GetPredicate(identifier); Query = items.SingleDefferred(identifierPredicate); }
public EngineModule( ILogger logger, IMessageService messageService, IUnitOfWork uow, IEngineRepository engineRepository) : base(logger, messageService) { this.uow = uow; this.engineRepository = engineRepository; inputProperties = new List <IEngineElementProperty>(); outputProperties = new List <IEngineElementProperty>(); }
public void TryWrapEvents([CanBeNull] IDataChangeEvents <TItem> events) { if (events == null || !events.HasAnyEvent) { return; } var wrappedRepo = new EventWrappedRepository <TItem>(Repository, events); Repository = wrappedRepo; Transaction = new EventWrappedTransaction(Transaction, wrappedRepo); }
public EngineUIService( ILogger <EngineUIService> logger, IUnitOfWork uow, IEngine engine, IEngineRepository engineRepository, IEngineUIServiceConfig configuration) : base(logger) { this.uow = uow; this.engine = engine; this.engineRepository = engineRepository; this.configuration = configuration; }
public EngineService(IOptions <EngineOptions> options, IEngineRepository engineRepo, IBuildRepository buildRepo, IRepository <Project> projectRepo, Func <string, Owned <EngineRunner> > engineRunnerFactory) { _options = options; _engineRepo = engineRepo; _buildRepo = buildRepo; _projectRepo = projectRepo; _engineRunnerFactory = engineRunnerFactory; _runners = new ConcurrentDictionary <string, Owned <EngineRunner> >(); _lock = new AsyncReaderWriterLock(); _commitTimer = new AsyncTimer(EngineCommitAsync); }
public EngineJob( IUnitOfWork uow, IEngineRepository enginRepo, ILogger <EngineJob> logger, IMessageService messageService, IServiceProvider serviceProvider, IEngine engine) : base(logger, messageService) { this.uow = uow; this.engineRepository = enginRepo; this.serviceProvider = serviceProvider; this.engine = engine; }
/// <summary> /// Initializes a new instance of the <see cref="EngineTask"/> class. /// </summary> /// <param name="uow">The uow.</param> /// <param name="engineRepository">The engine repository.</param> /// <param name="logger">The logger.</param> /// <param name="messageService">The message service.</param> /// <param name="engine">The engine.</param> /// <param name="serviceProvider">The service provider.</param> public EngineTask( IUnitOfWork uow, IEngineRepository engineRepository, ILogger <EngineTask> logger, IMessageService messageService, IEngine engine, IServiceProvider serviceProvider) : base(logger, messageService) { this.uow = uow; this.engineRepository = engineRepository; this.engine = engine; this.serviceProvider = serviceProvider; }
/// <summary> /// Attempts to locate the item to modify using the modification request data. /// </summary> internal async Task <DeferredItemBase <TNav> > LocateOrCreateItemAsync(IEngineRepository <TNav> navRepository, RestItemData itemData, Func <Task> loadParentAsync) { var locatedItem = LocateItem(navRepository, itemData); if (locatedItem != null) { return(locatedItem); } await loadParentAsync(); return(new CreatableItem <TNav>(navRepository)); }
public EngineService(IOptions <EngineOptions> engineOptions, IEngineRepository engines, IBuildRepository builds, IProjectRepository projects, Func <string, Owned <EngineRuntime> > engineRuntimeFactory) { _engineOptions = engineOptions; _engines = engines; _builds = builds; _projects = projects; _engineRunnerFactory = engineRuntimeFactory; _runtimes = new ConcurrentDictionary <string, Owned <EngineRuntime> >(); _lock = new AsyncReaderWriterLock(); _commitTimer = new AsyncTimer(EngineCommitAsync); }
/// <summary> /// Initializes a new instance of the <see cref="EngineElement"/> class. /// </summary> /// <param name="uow">The uow.</param> /// <param name="enginRepo">The engin repo.</param> /// <param name="logger">The logger.</param> /// <param name="messageService">The message service.</param> public EngineElement( IUnitOfWork uow, IEngineRepository enginRepo, ILogger <EngineElement> logger, IMessageService messageService) : base(logger, messageService) { this.uow = uow; this.engineRepository = enginRepo; inputProperties = new List <IEngineElementProperty>(); outputProperties = new List <IEngineElementProperty>(); // Create the instance ID for this element instance = engineRepository.CreateNewInstance(); }
public StatisticController(IMapper mapper, IManufacturerRepository manufacturerRepository, IModelRepository modelRepository, IInventoryRepository inventoryRepository, IEngineTypeRepository engineTypeRepository, IEngineRepository engineRepository) { _mapper = mapper; _manufacturers = manufacturerRepository; _models = modelRepository; _inventory = inventoryRepository; _engines = engineRepository; _engineTypes = engineTypeRepository; }
public AdministrationController(RoleManager <IdentityRole> roleManager, UserManager <IdentityUser> userManager, ISearchRepository searchRepository, IEngineRepository engineRepository, IResultRepository resultRepository, IHistoryRepository historyRepository ) { this.roleManager = roleManager; this.userManager = userManager; this.searchRepository = searchRepository; this.engineRepository = engineRepository; this.resultRepository = resultRepository; this.historyRepository = historyRepository; }
public IRestCollection GetRestCollection() { IDataTransaction transaction = _dataSource.CreateTransaction(); // TODO setup disposing of transaction IEngineRepository <TItem> repository = _dataSource.GetRepository <TItem>(transaction); var wrapper = new DataEventWrapper <TItem>(transaction, repository); wrapper.TryWrapEvents(_events); IEngineContext <TItem> context = new FullEngineContext <TItem>(wrapper.Transaction, wrapper.Repository, _subContext); return(new EngineRestCollection <TItem>(context)); }
public IRestCollection GetRestCollection(Stem <TItem> stem) { IDataTransaction transaction = _dataSource.CreateTransaction(); stem.OnDispose += delegate { transaction.Dispose(); }; IEngineRepository <TItem> repository = _dataSource.GetRepository <TItem>(transaction); var wrapper = new DataEventWrapper <TItem>(transaction, repository); wrapper.TryWrapEvents(new StemDataChangeEvents <TItem>(stem)); var subContext = new StemsEngineSubContext <TItem>(stem); var context = new FullEngineContext <TItem>(wrapper.Transaction, wrapper.Repository, subContext); return(new EngineRestCollection <TItem>(context)); }
public static async Task <Engine> GetByLocatorAsync(this IEngineRepository engineRepo, EngineLocatorType locatorType, string locator, CancellationToken ct = default(CancellationToken)) { switch (locatorType) { case EngineLocatorType.Id: return(await engineRepo.GetAsync(locator, ct)); case EngineLocatorType.LanguageTag: int index = locator.IndexOf("_", StringComparison.OrdinalIgnoreCase); string sourceLanguageTag = locator.Substring(0, index); string targetLanguageTag = locator.Substring(index + 1); return(await engineRepo.GetByLanguageTagAsync(sourceLanguageTag, targetLanguageTag, ct)); case EngineLocatorType.Project: return(await engineRepo.GetByProjectIdAsync(locator, ct)); } return(null); }
/// <summary> /// Attempts to locate the item to modify using the modification request data. /// </summary> internal DeferredItemBase <TNav> LocateItem(IEngineRepository <TNav> navRepository, RestItemData itemData) { foreach (string fieldName in itemData.Keys) { // TODO implicit & explicit location option e.g. { "*id": 123 } IItemLocator <TNav> locator = _subContext.Fields.GetLocator(fieldName); if (locator != null) { object findValue = itemData[fieldName]; TNav locatedItem = locator.TryLocateItem(navRepository, findValue); if (locatedItem != null) { itemData.Remove(fieldName); // remove so we don't write to this value later. return(new LoadedItem <TNav>(locatedItem)); } } } return(null); }