public StepService(ICacheManager cacheManager, IStepRepository stepRepository, IPointRepository pointRepository) : base(cacheManager) { _stepRepository = stepRepository; _pointRepository = pointRepository; }
public RecipeController( IRecipeRepository recipeRepo, IRecipeIngredientRepository ingredientRepo, IStepRepository stepRepo, IRecipeImageRepository imageRepo, IRecipeRateRepository rateRepo, ICategoryRepository categoriesRepo, IBookmarkRepository bookMarkRepo, IRecipeCategoryRepository categoryRepo, IUserRepository userRepo, IHostingEnvironment environment, IHttpContextAccessor accessor ) { this.recipeRepo = recipeRepo; this.ingredientRepo = ingredientRepo; this.stepRepo = stepRepo; this.imageRepo = imageRepo; this.rateRepo = rateRepo; this.categoriesRepo = categoriesRepo; this.bookMarkRepo = bookMarkRepo; this.categoryRepo = categoryRepo; this.userRepo = userRepo; this.environment = environment; this.accessor = accessor; }
public StepArtifactService( IBatchRepository batchRepository, IStepRepository stepRepository) { this.batchRepository = batchRepository; this.stepRepository = stepRepository; }
public StepOptionService( IBatchRepository batchRepository, IStepRepository stepRepository) { this.batchRepository = batchRepository; this.stepRepository = stepRepository; }
public BaseStep(IExecutionRepository executionRepository, IStepRepository stepRepository, IExtendedFieldRepository extendedFieldRepository) { _executionRepository = executionRepository; _stepRepository = stepRepository; _extendedFieldRepository = extendedFieldRepository; }
public StepsController( DataContext context, IStepRepository stepRepository) { _context = context; _stepRepository = stepRepository; }
public StepVariableService( IBatchRepository batchRepository, IStepRepository stepRepository) { this.batchRepository = batchRepository; this.stepRepository = stepRepository; }
protected override void ConfigureAppHost(IContainer container) { batchRepository = Substitute.For <IBatchRepository>(); container.AddTransient(() => batchRepository); stepRepository = Substitute.For <IStepRepository>(); container.AddTransient(() => stepRepository); }
public DishService(DatabaseContext context, IConfiguration config, IDishRepository dishRepo, IIngredientRepository ingredientRepo, IStepRepository stepRepo, IHistoryRepository historyRepo) { _context = context; _config = config; _dishRepo = dishRepo; _ingredientRepo = ingredientRepo; _stepRepo = stepRepo; _historyRepo = historyRepo; }
public CommandVariableService( IBatchRepository batchRepository, IStepRepository stepRepository, ICommandRepository commandRepository) { this.batchRepository = batchRepository; this.stepRepository = stepRepository; this.commandRepository = commandRepository; }
public static GetAllTextStepDataResponse GetAllTextSteps(GetAllTextStepDataRequest request) { GetAllTextStepDataResponse result = new GetAllTextStepDataResponse(); IStepRepository <GetAllTextStepDataResponse> repo = StepRepositoryFactory <GetAllTextStepDataResponse> .GetStepRepository(request.ContractNumber, request.Context, "text"); repo.UserId = request.UserId; result = repo.SelectAll() as GetAllTextStepDataResponse; return(result); }
public static GetTextStepDataResponse GetTextStepByID(GetTextStepDataRequest request) { GetTextStepDataResponse result = new GetTextStepDataResponse(); IStepRepository <GetTextStepDataResponse> repo = StepRepositoryFactory <GetTextStepDataResponse> .GetStepRepository(request.ContractNumber, request.Context, textstep); repo.UserId = request.UserId; result = repo.FindByID(request.TextStepID) as GetTextStepDataResponse; return(result != null ? result : new GetTextStepDataResponse()); }
public RouteStepService(ICacheManager cacheManager, IRouteBaseRepository routeBaseRepository, IPointRepository pointRepository, IStepRepository stepRepository, IComputeRoutePaths computeRoutePaths) : base(cacheManager) { _routeBaseRepository = routeBaseRepository; _pointRepository = pointRepository; _stepRepository = stepRepository; _computeRoutePaths = computeRoutePaths; }
public StepsController(IStepRepository thisRepo = null) { if (thisRepo == null) { this.stepRepo = new EFStepRepository(); } else { this.stepRepo = thisRepo; } }
public RecipesController(IRecipeRepository recipeRepository, IAuthorRepository authorRepository, ICategoryRepository categoryRepository , IReviewRepository reviewRepository, IStepRepository stepRepository, IIngredientRepository ingredientRepository, ICountryRepository countryRepository) { _recipeRepository = recipeRepository; _authorRepository = authorRepository; _categoryRepository = categoryRepository; _reviewRepository = reviewRepository; _stepRepository = stepRepository; _ingredientRepository = ingredientRepository; _countryRepository = countryRepository; }
public bool IsSatisfiedBy(IStepRepository stepRepository, SkipContext skipContext) { if (SkipLimit == 0) return false; int exceptionCount = stepRepository.GetExceptionCount(skipContext); if (exceptionCount >= SkipLimit || !_skippableExceptions.Contains(skipContext.GetExceptionType())) return false; stepRepository.SaveExceptionInfo(skipContext, exceptionCount); return true; }
public RecipeService(IRecipeRepository recipeRepository, IRecipeIngredientRepository recipeIngredientRepository, IStepRepository stepRepository, IRecipeHistoryRepository recipeHistoryRepository, ISecurityService securityService) { RecipeRepository = recipeRepository; RecipeIngredientRepository = recipeIngredientRepository; StepRepository = stepRepository; RecipeHistoryRepository = recipeHistoryRepository; RecipeParser = new RecipeParser(new ParserConfiguration()); SecurityService = securityService; }
/// <summary>Constructor to the calculator of the best path between an origin and a destination point.</summary> /// <param name="pointRepository">Point repository.</param> /// <param name="stepRepository">Step repository.</param> /// <param name="routeBase">Route base holding the origin and destination points.</param> public BestPathCalculator(IPointRepository pointRepository, IStepRepository stepRepository, RouteBase routeBase, PathPerformanceOptions option) { _pointRepository = pointRepository; _stepRepository = stepRepository; _routeBase = routeBase; _pathOption = option; _pointStepsList = new List <PointSteps>(); _isVisited = new List <Point>(); StepsCollection = new StepsCollection(); }
public bool Process(StepContext stepContext, IStepRepository stepRepository) { // Create a new target folder, if necessary. if (!Directory.Exists(_targetPath)) Directory.CreateDirectory(_targetPath); string destinationFile = Path.Combine(_targetPath, _fileName); // Copy the file to dest location and overwriter the destination file if it already exists. File.Copy(_source, destinationFile, true); return true; }
public MyFeelsQueryHandler( IEventRepository eventRepository, IStepRepository stepRepository, IStepDetailsRepository stepDetailsRepository, ILocalTimeZoneConvertProvider localTimeZoneConvertProvider, FIL.Logging.ILogger logger) { _stepDetailsRepository = stepDetailsRepository; _eventRepository = eventRepository; _stepRepository = stepRepository; _localTimeZoneConvertProvider = localTimeZoneConvertProvider; _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="GamePageViewModel"/> class. /// </summary> /// <param name="navigationService">NavigationService interface, injected</param> /// <param name="step">Step repository interface, injected</param> public GamePageViewModel(INavigationService navigationService, IStepRepository step) { this.navigationService = navigationService; this.NavigateTeam = new DelegateCommand(this.GoToTeam); this.NavigateValidation = new DelegateCommand(this.GoToValidation); this.stepRepo = step; CurrentUser.CurrentStep = step.GetCurrentStep(CurrentUser.Player.Id); this.ParcoursName = CurrentUser.CurrentStep.RouteName; this.StepName = CurrentUser.CurrentStep.StepName; this.StepDescription = CurrentUser.CurrentStep.StepDescription; }
public InstructionController(IInstructionRepository repoInstr, IStepRepository repoStep, UserManager <User> userManager, ApplicationContext ctx, ILikeRepository repoLike, ITagRepository repoTag, ICommentRepository repoComment) { repositoryInstr = repoInstr; repositoryStep = repoStep; repositoryTag = repoTag; repositoryLike = repoLike; repositoryComment = repoComment; _userManager = userManager; context = ctx; }
public static IStepRepository <T> GetStepRepository(string dbName, string productName, string type) { IStepRepository <T> repo = null; if (type.Equals("yesno", StringComparison.InvariantCultureIgnoreCase)) { repo = new MongoYesNoStepRepository <T>(dbName) as IStepRepository <T>; } else if (type.Equals("text", StringComparison.InvariantCultureIgnoreCase)) { repo = new MongoTextStepRepository <T>(dbName) as IStepRepository <T>; } return(repo); }
public bool Process(StepContext stepContext, IStepRepository stepRepository) { // Create a new target folder, if necessary. if (!Directory.Exists(_targetPath)) { Directory.CreateDirectory(_targetPath); } string destinationFile = Path.Combine(_targetPath, _fileName); // Copy the file to dest location and overwriter the destination file if it already exists. File.Copy(_source, destinationFile, true); return(true); }
public bool Process(StepContext stepContext, IStepRepository stepRepository) { bool success = true; StepContext ctx = StepContext.InitialRun(stepContext, _chunkSize); while (ctx.HasNext) { long newStepId = stepRepository.InsertStep(ctx.StepName, ctx.NextStepIndex); bool exceptionThrown = false; bool skip = false; bool error = false; List <TInput> items = Enumerable.Empty <TInput>().ToList(); TOutput[] processed = Enumerable.Empty <TOutput>().ToArray(); try { items = _reader.Read(ctx.StepIndex, _chunkSize).ToList(); processed = items.Select(item => _processor.Process(item)).ToArray(); if (processed.Any()) { success &= _writer.Write(processed); } } catch (Exception ex) { error = true; skip = _skipPolicy.IsSatisfiedBy(stepRepository, new SkipContext(ctx.StepName, ctx.NextStepIndex, ex)); if (!skip) { exceptionThrown = true; throw; } } finally { if (!exceptionThrown) { ctx = StepContext.Increment(ctx, items.Count, processed.Length, skip); } stepRepository.UpdateStep(newStepId, processed.Length, error, skip); } } return(success); }
/// <summary>Constructor to the calculator of all paths between an origin and a destination point.</summary> /// <param name="pointRepository">Point repository.</param> /// <param name="stepRepository">Step repository.</param> /// <param name="routeBase">Route base holding the origin and destination points.</param> public AllPathsCalculator(IPointRepository pointRepository, IStepRepository stepRepository, RouteBase routeBase) { _pointRepository = pointRepository; _stepRepository = stepRepository; _pointStepsList = new List <PointSteps>(); _isVisited = new List <Point>(); Route = new Route { Id = routeBase.Id, Origin = routeBase.Origin, OriginId = routeBase.Origin.Id, Destination = routeBase.Destination, DestinationId = routeBase.Destination.Id, StepsCollectionList = new List <StepsCollection>() }; }
public bool IsSatisfiedBy(IStepRepository stepRepository, SkipContext skipContext) { if (SkipLimit == 0) { return(false); } int exceptionCount = stepRepository.GetExceptionCount(skipContext); if (exceptionCount >= SkipLimit || !_skippableExceptions.Contains(skipContext.GetExceptionType())) { return(false); } stepRepository.SaveExceptionInfo(skipContext, exceptionCount); return(true); }
public StepQueryHandler(IEventRepository eventRepository, IStepDetailsRepository stepDetailsRepository, IEventStepDetailRepository eventStepDetailRepository, IStepProvider stepProvider, IZoomUserRepository zoomUserRepository, IEventDetailRepository eventDetailRepository, IStepRepository stepRepository ) { _eventRepository = eventRepository; _stepRepository = stepRepository; _stepDetailsRepository = stepDetailsRepository; _eventStepDetailRepository = eventStepDetailRepository; _stepProvider = stepProvider; _eventDetailRepository = eventDetailRepository; _zoomUserRepository = zoomUserRepository; }
public RecipeDbRepository( IDbImageRepository images, IIngrediantRepository ingrediants, IRecipeRepository recipes, ISourceRepository <RecipeUrlSource> urlSources, ISourceRepository <RecipeCookbookSource> cookbookSources, IStepRepository steps, ITagsRepository tags ) { this.Images = images; this.Ingrediants = ingrediants; this.Recipes = recipes; this.UrlSources = urlSources; this.CookBookSources = cookbookSources; this.Steps = steps; this.Tags = tags; }
public WaterMetersController( DataContext context, IWaterMeterRepository waterMeterRepository, IBillRepository billRepository, IStepRepository stepRepository, ICityRepository cityRepository, IUserHelper userHelper, IChartHelper chartHelper, IPdfHelper pdfHelper, IMailHelper mailHelper) { _context = context; _waterMeterRepository = waterMeterRepository; _billRepository = billRepository; _stepRepository = stepRepository; _userHelper = userHelper; _cityRepository = cityRepository; _chartHelper = chartHelper; _pdfHelper = pdfHelper; _mailHelper = mailHelper; }
public RecipeStepService(IStepRepository rep, IRecipeRepository recipeRep, IMapper mapper, ILoggerFactory loggerFactory) { if (rep == null) { throw new ArgumentNullException(nameof(rep)); } if (recipeRep == null) { throw new ArgumentNullException(nameof(recipeRep)); } if (mapper == null) { throw new ArgumentNullException(nameof(mapper)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } this._recipeRep = recipeRep; this.Logger = loggerFactory?.CreateLogger <RecipeStepService>(); this.Mapper = mapper; this.Repository = rep; }
public ComputeRoutePaths(ICacheManager cacheManager, IStepRepository stepRepository, IPointRepository pointRepository) { _cacheManager = cacheManager; _stepRepository = stepRepository; _pointRepository = pointRepository; }