/// <summary> /// /// </summary> /// <param name="projectRepository"></param> /// <param name="mapper"></param> /// <param name="tasktRepository"></param> /// <param name="listRepository"></param> public ProjectService(IProjectRepository projectRepository, IMapper mapper, ITaskRepository tasktRepository, IListRepository listRepository) { _projectRepository = projectRepository; _tasktRepository = tasktRepository; _listRepository = listRepository; _mapper = mapper; }
public ListsController(IListRepository listRepository, IItemRepository itemRepository, ILogger <ListsController> logger, IMapper mapper) { _listRepository = listRepository; _itemRepository = itemRepository; _logger = logger; _mapper = mapper; }
private static void SchoolListByAreaGridView(ref GridView myGridView, string method, string userID, string schoolyear, string schoolcode, string schoolArea) { try { if (method == "DataSet") { DataTable gridData = PLFSchoolList.SchoolListByArea("Get", userID, schoolyear, schoolcode, schoolArea).Tables[0]; myGridView.DataSource = gridData; myGridView.DataBind(); } if (method == "iList") { IListRepository <Employee2, string> repository = Factory.Get <EmployeeList>(); IList <Employee2> gridData = repository.GetListItems(WorkingProfile.UserRole, userID, schoolyear, schoolcode); //, schoolArea); myGridView.DataSource = gridData; myGridView.DataBind(); } if (method == "Dapper") { List <School> schools = new List <School>(); DataAccessLay dataaccesslay = new DataAccessLay(); schools = dataaccesslay.GetSchools("Get", userID, schoolyear, schoolcode, schoolArea); myGridView.DataSource = schools; myGridView.DataBind(); } } catch (System.Exception ex) { string em = ex.Message; } }
public ListService( IListRepository listRepository, IListItemRepository listItemRepository) { _listRepository = listRepository; _listItemRepository = listItemRepository; }
public void SetUp() { _repository = Substitute.For <IListRepository>(); _timeManager = Substitute.For <ITimeManager>(); _getItemService = Substitute.For <IGetItemService>(); _updateItemService = new UpdateItemService(_repository, _timeManager, _getItemService); }
public LabType( IProjectRepository projectRepository, IListRepository listRepository, ISeriesRepository seriesRepository, IPointRepository pointRepository) { Field(x => x.IdLab).Description("IdLab"); Field(x => x.Name).Description("Name"); Field(x => x.Location).Description("Location"); Field(x => x.Timestamp, nullable: true).Description("Timestamp"); Field <ListGraphType <ProjectType> >( "projects", resolve: x => projectRepository.GetProjectsForLab(x.Source.IdLab) ); Field <ListGraphType <ListType> >( "lists", resolve: x => listRepository.GetListsForLab(x.Source.IdLab) ); Field <ListGraphType <SeriesType> >( "series", resolve: x => seriesRepository.GetSeriesForLab(x.Source.IdLab) ); Field <ListGraphType <PointType> >( "points", resolve: x => pointRepository.GetPointsForLab(x.Source.IdLab) ); }
public void SetUp() { _repository = Substitute.For <IListRepository>(); _timeManager = Substitute.For <ITimeManager>(); _guidGenerator = Substitute.For <IIdGenerator <Guid> >(); _createItemService = new CreateItemService(_repository, _guidGenerator, _timeManager); }
public ListController(IListRepository itemDbRepository) { // Read the initial list from the database repository this.itemDbRepository = itemDbRepository; itemList = new ItemList(itemDbRepository.ReadAll()); }
public ShoppingService() { this._ilistRepository = new ListRepository(); this._ilistDetailRepository = new ListDetailRepository(); this._iUserRepository = new UserRepository(); this._iProductRepository = new ProductRepository(); }
public MemberSubscriptionFeedProvider(ILog log, IListRepository listRepository, IVkResponseMapper responseMapper, IVkDataLimits dataLimits, IDateTimeHelper dateTimeHelper) { this.log = log; this.listRepository = listRepository; this.responseMapper = responseMapper; this.dataLimits = dataLimits; this.dateTimeHelper = dateTimeHelper; }
/// <summary> /// /// </summary> /// <param name="spaceRepository"></param> /// <param name="projectRepository"></param> /// <param name="listRepository"></param> /// <param name="taskRepository"></param> /// <param name="mapper"></param> public SpaceService(ISpaceRepository spaceRepository, IProjectRepository projectRepository, IListRepository listRepository, ITaskRepository taskRepository, IMapper mapper) { _spaceRepository = spaceRepository; _projectRepository = projectRepository; _listRepository = listRepository; _taskRepository = taskRepository; _mapper = mapper; }
public MemberSharesFeedProvider(ILog log, IDateTimeHelper dateTimeHelper, IListRepository listRepository, IVkResponseMapper responseMapper, IProcessingStrategy strategy) { this.log = log; this.dateTimeHelper = dateTimeHelper; this.listRepository = listRepository; this.responseMapper = responseMapper; this.strategy = strategy; }
static ListRepositoryLocator() { string dataSource = Configuration.GetDataSource(DataSources.ListsDataSourceName, Properties.Settings.Default.ListsDataSource); if (!_setRepo.ContainsKey(dataSource)) throw new InvalidDataSourceException(); _setRepo[dataSource].Invoke(); _repo = RepositoryFactory.Make<IListRepository>(); }
internal static Guid CanNotDelete <TEntity>(this IListRepository <TEntity, Guid> repo) where TEntity : BaseEntity { var id = Guid.NewGuid(); repo.Delete(id).Returns(new Result <TEntity>().AddErrorMessage("Not found")); return(id); }
public PlaylistBootstrapper(IJsonEntityLoader entityLoader, IListRepository <LocalPlaylist> localPlaylistRepository, IListRepository <LocalTrack> localTrackRepository) { _entityLoader = entityLoader; _localPlaylistRepository = localPlaylistRepository; _localTrackRepository = localTrackRepository; }
public ListsController(ILoggerService logger, IListRepository listRepository, IUserRepository userRepository) { _logger = logger; _listRepository = listRepository; _userRepository = userRepository; }
public ItemsController(ILoggerService logger, IItemRepository itemRepository, IListRepository listRepository) { _logger = logger; _itemRepository = itemRepository; _listRepository = listRepository; }
private static void ConfigureRepositoryAndTimeManager(IListRepository repository, ITimeManager timeManager, Item originalItem, Item expectedItem) { repository.UpdateItemAsync(Arg.Is <Item>(item => item.Id == originalItem.Id)) .Returns(result => Task.FromResult((Item)result[0])); repository.GetItemAsync(originalItem.Id).Returns(Task.FromResult(originalItem)); timeManager.GetCurrentTime().Returns(expectedItem.LastUpdateTime); }
public CardService(ICommentRepository commentRepository, ICardRepository cardRepository, IListRepository listRepository, IMapper mapper, IObfuscator obfuscator) { _commentRepository = commentRepository; _cardRepository = cardRepository; _listRepository = listRepository; _mapper = mapper; _obfuscator = obfuscator; }
public ListController(IListRepository repository, IUrlLocator locator, IGetItemService getItemService, ICreateItemService createItemService, IUpdateItemService updateItemService) { _repository = repository; _urlLocator = locator; _getItemService = getItemService; _createItemService = createItemService; _updateItemService = updateItemService; }
public ListController( IAlertRepository alertRepository, IListRepository listRepository, IAlertListFactory alertListFactory) { this._alertRepository = alertRepository; this._listRepository = listRepository; this._alertListFactory = alertListFactory; }
public ListService( IListRepository listRepository, IItemRepository itemRepository, IUserAuthorizationService userAuthorizationService) { this.listRepository = listRepository; this.itemRepository = itemRepository; this.userAuthorizationService = userAuthorizationService; }
public ListService(IUnitOfWork unitOfWork, IListRepository listRepository, User currentUser) { Guard.NotNull<IUnitOfWork>(() => unitOfWork, unitOfWork); Guard.NotNull<IListRepository>(() => listRepository, listRepository); Guard.NotNull<User>(() => currentUser, currentUser); this.unitOfWork = unitOfWork; this.listRepository = listRepository; this.currentUser = currentUser; }
public ListManager(IListRepository listRepository, IAddressTypeEntityService addressTypeEntityService, IAttributeTypeEntityService attributeTypeEntityService, IEmployeeTypeEntityService employeeTypeEntityService, IEntityTypeEntityService entityTypeEntityService, IProductTypeEntityService productTypeEntityService) { _listRepository = listRepository; _addressTypeEntityService = addressTypeEntityService; _attributeTypeEntityService = attributeTypeEntityService; _employeeTypeEntityService = employeeTypeEntityService; _entityTypeEntityService = entityTypeEntityService; _productTypeEntityService = productTypeEntityService; }
public void Init() { _repository = Substitute.For <IListRepository>(); _location = Substitute.For <IUrlLocator>(); _listController = new ListController(_repository, _location) { Request = new HttpRequestMessage(), Configuration = new HttpConfiguration() }; }
public static Dictionary <string, Core.Models.Lists.CustomInventoryItemReturnModel> GetCustomInventoryInformation (UserSelectedContext catalogInfo, IListRepository listRepo, ICacheRepository cache) { Dictionary <string, Core.Models.Lists.CustomInventoryItemReturnModel> inventorydictionary = new Dictionary <string, Core.Models.Lists.CustomInventoryItemReturnModel>(); Dictionary <string, Core.Models.Lists.CustomInventoryItemReturnModel> cachedInventorydictionary = cache.GetItem <Dictionary <string, Core.Models.Lists.CustomInventoryItemReturnModel> >(CACHE_GROUPNAME, CACHE_PREFIX, CACHE_NAME, string.Format("CustomInventoryDictionary_{0}_{1}", catalogInfo.BranchId, catalogInfo.CustomerId)); if (cachedInventorydictionary == null) { //List inventory = listRepo.ReadListForCustomer(catalogInfo, true) // .Where(i => i.Type == ListType.CustomInventory) // .FirstOrDefault(); //if (inventory != null) //{ // inventorydictionary = new Dictionary<string, Core.Models.Lists.CustomInventoryItemReturnModel>(); // foreach (var itm in inventory.Items) // { // if (inventorydictionary.Keys.Contains(itm.ItemNumber) == false) // { // inventorydictionary.Add(itm.ItemNumber, new Core.Models.Lists.CustomInventoryItemReturnModel() // { // ItemNumber = itm.ItemNumber, // Name = itm.Name, // Brand = itm.Brand, // Vendor = itm.Vendor, // Pack = itm.Pack, // Size = itm.Size, // CasePrice = itm.CasePrice, // PackagePrice = itm.PackagePrice, // Each = (itm.Each != null) ? itm.Each.Value : false // }); // } // } //} //cache.AddItem<Dictionary<string, Core.Models.Lists.CustomInventoryItemReturnModel>>(CACHE_GROUPNAME, // CACHE_PREFIX, // CACHE_NAME, // string.Format("CustomInventoryDictionary_{0}_{1}", // catalogInfo.BranchId, // catalogInfo.CustomerId), TimeSpan.FromMinutes(5), inventorydictionary); } else { inventorydictionary = cachedInventorydictionary; } return(inventorydictionary); }
public ListType(IListRepository listRepository, IPointRepository pointRepository) { Field(x => x.IdLab).Description("IdLab"); Field(x => x.IdProject).Description("IdProject"); Field(x => x.IdList).Description("IdList"); Field(x => x.Name).Description("Name"); Field(x => x.Timestamp, nullable: true).Description("Timestamp"); Field <ListGraphType <PointType> >( "points", resolve: x => pointRepository.GetPointsForList(x.Source.IdLab, x.Source.IdProject, x.Source.IdList) ); }
public LibraryListsFromDynamicRepositoryTest() { var fake = A.Fake<IEnvironmentPathProvider>(); A.CallTo(() => fake.GetImageCachePath()).Returns(_imageCache); var path = Path.Combine(Environment.CurrentDirectory, PathString); A.CallTo(() => fake.GetXmlFilePath()).Returns(path); var aleph = new AlephRepository(fake); _listRepository = new LibraryListDynamicRepository(aleph, new ImageRepository(aleph, fake), fake); }
internal static TEntity CanDelete <TEntity>(this IListRepository <TEntity, Guid> repo) where TEntity : BaseEntity { var id = Guid.NewGuid(); var entity = Activator.CreateInstance <TEntity>(); entity.Id = id; repo.Delete(id).Returns(new Result <TEntity>() { Return = entity }); return(entity); }
public SharedListController( IListRepository listRepository, IUserRepository userRepository, IProductRepository productRepository, IUserAlertFactory userAlertFactory, IAlertListFactory alertListFactory, IProductFactory productFactory) { this._listRepository = listRepository; this._userRepository = userRepository; this._productRepository = productRepository; this._userAlertFactory = userAlertFactory; this._alertListFactory = alertListFactory; }
public UserService(UserManager <User> userManager, IMapper mapper, ICardRepository cardRepository, IListRepository listRepository, IUserBoardRepository userBoardRepository, IObfuscator obfuscator, IHttpContextAccessor accessor, ILogger <UserService> logger, IOptions <IPGeoOptions> iPGeoOptions) { _userManager = userManager; _mapper = mapper; _cardRepository = cardRepository; _listRepository = listRepository; _userBoardRepository = userBoardRepository; _obfuscator = obfuscator; _accessor = accessor; _logger = logger; _configuration = iPGeoOptions.Value; _httpClient = new HttpClient(); }
public AlertUsersJob( IProductRepository productRepository, IUserRepository userRepository, IListRepository listRepository, IAlertRepository alertRepository, IHandlerFactory handlerFactory, IEmailSender emailSender) { this._productRepository = productRepository; this._userRepository = userRepository; this._listRepository = listRepository; this._alertRepository = alertRepository; this._handlerFactory = handlerFactory; this._emailSender = emailSender; }
public MemoryContext(IContextConfiguration configuration) : base(configuration) { _storeSet = new Dictionary <Type, object>(); _storeSet.Add(typeof(UserModel), new List <UserModel>()); _storeSet.Add(typeof(ListModel), new List <ListModel>()); _storeSet.Add(typeof(ListItemModel), new List <ListItemModel>()); _userRepository = new UserRepository(this); _listRepository = new ListRepository(this); _listItemRepository = new ListItemRepository(this); _nextIds = new Dictionary <Type, int>(); _nextIds.Add(typeof(UserModel), 1); _nextIds.Add(typeof(ListModel), 1); _nextIds.Add(typeof(ListItemModel), 1); }
public ListController(IListRepositoryStatic staticRepository, IListRepository dynamicRepository) { _staticRepository = staticRepository; _dynamicRepository = dynamicRepository; }
public ListService(IListRepository listRep, IUnitOfWork uow) { _listRep = listRep; _uow = uow; }
public ListManager(IListRepository listRepository, IListGoodRepository listGoodRepository, IDateTimeService dateTimeService) { _listRepository = listRepository; _listGoodRepository = listGoodRepository; _dateTimeService = dateTimeService; }
public ListRepositoryTests() { _listRepository = new ListRepository<TestEntity>(ListUrl, ListName); }
public void Init() { var path = Path.Combine(Environment.CurrentDirectory, PathString); var aleph = new AlephRepository(_imageCache); _listRepository = new LibraryListDynamicRepository(aleph, new ImageRepository(aleph, _imageCache), path); }