コード例 #1
0
 /// <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;
 }
コード例 #2
0
 public ListsController(IListRepository listRepository, IItemRepository itemRepository, ILogger <ListsController> logger, IMapper mapper)
 {
     _listRepository = listRepository;
     _itemRepository = itemRepository;
     _logger         = logger;
     _mapper         = mapper;
 }
コード例 #3
0
ファイル: ListGridViewData.cs プロジェクト: FrankMi101/PLF4
 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;
     }
 }
コード例 #4
0
 public ListService(
     IListRepository listRepository,
     IListItemRepository listItemRepository)
 {
     _listRepository     = listRepository;
     _listItemRepository = listItemRepository;
 }
コード例 #5
0
 public void SetUp()
 {
     _repository        = Substitute.For <IListRepository>();
     _timeManager       = Substitute.For <ITimeManager>();
     _getItemService    = Substitute.For <IGetItemService>();
     _updateItemService = new UpdateItemService(_repository, _timeManager, _getItemService);
 }
コード例 #6
0
 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)
         );
 }
コード例 #7
0
 public void SetUp()
 {
     _repository        = Substitute.For <IListRepository>();
     _timeManager       = Substitute.For <ITimeManager>();
     _guidGenerator     = Substitute.For <IIdGenerator <Guid> >();
     _createItemService = new CreateItemService(_repository, _guidGenerator, _timeManager);
 }
コード例 #8
0
        public ListController(IListRepository itemDbRepository)
        {
            // Read the initial list from the database repository
            this.itemDbRepository = itemDbRepository;

            itemList = new ItemList(itemDbRepository.ReadAll());
        }
コード例 #9
0
 public ShoppingService()
 {
     this._ilistRepository       = new ListRepository();
     this._ilistDetailRepository = new ListDetailRepository();
     this._iUserRepository       = new UserRepository();
     this._iProductRepository    = new ProductRepository();
 }
コード例 #10
0
 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;
 }
コード例 #11
0
 /// <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;
 }
コード例 #12
0
 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;
 }
コード例 #13
0
        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>();
        }
コード例 #14
0
        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);
        }
コード例 #15
0
 public PlaylistBootstrapper(IJsonEntityLoader entityLoader,
                             IListRepository <LocalPlaylist> localPlaylistRepository,
                             IListRepository <LocalTrack> localTrackRepository)
 {
     _entityLoader            = entityLoader;
     _localPlaylistRepository = localPlaylistRepository;
     _localTrackRepository    = localTrackRepository;
 }
コード例 #16
0
        public ListsController(ILoggerService logger, IListRepository listRepository, IUserRepository userRepository)
        {
            _logger = logger;

            _listRepository = listRepository;

            _userRepository = userRepository;
        }
コード例 #17
0
        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);
 }
コード例 #19
0
ファイル: CardService.cs プロジェクト: mwalczynski/PGSKanban
 public CardService(ICommentRepository commentRepository, ICardRepository cardRepository, IListRepository listRepository, IMapper mapper, IObfuscator obfuscator)
 {
     _commentRepository = commentRepository;
     _cardRepository    = cardRepository;
     _listRepository    = listRepository;
     _mapper            = mapper;
     _obfuscator        = obfuscator;
 }
コード例 #20
0
 public ListController(IListRepository repository, IUrlLocator locator, IGetItemService getItemService,
                       ICreateItemService createItemService, IUpdateItemService updateItemService)
 {
     _repository        = repository;
     _urlLocator        = locator;
     _getItemService    = getItemService;
     _createItemService = createItemService;
     _updateItemService = updateItemService;
 }
コード例 #21
0
 public ListController(
     IAlertRepository alertRepository,
     IListRepository listRepository,
     IAlertListFactory alertListFactory)
 {
     this._alertRepository  = alertRepository;
     this._listRepository   = listRepository;
     this._alertListFactory = alertListFactory;
 }
コード例 #22
0
 public ListService(
     IListRepository listRepository,
     IItemRepository itemRepository,
     IUserAuthorizationService userAuthorizationService)
 {
     this.listRepository           = listRepository;
     this.itemRepository           = itemRepository;
     this.userAuthorizationService = userAuthorizationService;
 }
コード例 #23
0
ファイル: ListService.cs プロジェクト: brunchey/BenNote
        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;
        }
コード例 #24
0
 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;
 }
コード例 #25
0
        public void Init()
        {
            _repository = Substitute.For <IListRepository>();
            _location   = Substitute.For <IUrlLocator>();

            _listController = new ListController(_repository, _location)
            {
                Request       = new HttpRequestMessage(),
                Configuration = new HttpConfiguration()
            };
        }
コード例 #26
0
        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);
        }
コード例 #27
0
        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)
                );
        }
コード例 #28
0
        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);

        }
コード例 #29
0
        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);
        }
コード例 #30
0
 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;
 }
コード例 #31
0
ファイル: UserService.cs プロジェクト: mwalczynski/PGSKanban
 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();
 }
コード例 #32
0
 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;
 }
コード例 #33
0
        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);
        }
コード例 #34
0
ファイル: ListController.cs プロジェクト: digbib/Solvberget
 public ListController(IListRepositoryStatic staticRepository, IListRepository dynamicRepository)
 {
     _staticRepository = staticRepository;
     _dynamicRepository = dynamicRepository;
 }
コード例 #35
0
ファイル: ListService.cs プロジェクト: kinderswan/BriefList
 public ListService(IListRepository listRep, IUnitOfWork uow)
 {
     _listRep = listRep;
     _uow = uow;
 }
コード例 #36
0
 public ListManager(IListRepository listRepository, IListGoodRepository listGoodRepository, IDateTimeService dateTimeService)
 {
     _listRepository = listRepository;
     _listGoodRepository = listGoodRepository;
     _dateTimeService = dateTimeService;
 }
コード例 #37
0
ファイル: ListRepositoryTests.cs プロジェクト: vooglie/SP
 public ListRepositoryTests()
 {
     _listRepository = new ListRepository<TestEntity>(ListUrl, ListName);
 }
コード例 #38
0
 public void Init()
 {
     var path = Path.Combine(Environment.CurrentDirectory, PathString);
     var aleph = new AlephRepository(_imageCache);
     _listRepository = new LibraryListDynamicRepository(aleph, new ImageRepository(aleph, _imageCache), path);
 }