Example #1
0
 public ValuesController(IUserInfoRepository userInfoRepository, IToDoListRepository toDoListRepository, IItemRepository itemRepository, IEncryptor encryptor)
 {
     this.userInfoRepository = userInfoRepository;
     this.toDoListRepository = toDoListRepository;
     this.itemRepository     = itemRepository;
     this.encryptor          = encryptor;
 }
        /// <summary>
        /// This is the main entry point for your service replica.
        /// This method executes when this replica of your service becomes primary and has write status.
        /// </summary>
        /// <param name="cancellationToken">Canceled when Service Fabric needs to shut down this service replica.</param>
        protected override async Task RunAsync(CancellationToken cancellationToken)
        {
            _repo = new ToDoListRepository(this.StateManager);
            //_mqHelper = new RabbitMQHelper();

            //await _mqHelper.ReadMessages<ToDoListContainer>(_config, StartNewToDoList, "ToDoList");
        }
Example #3
0
        public ToDoListAppQueryTest()
        {
            _toDoListRepository = Substitute.For <IToDoListRepository>();
            _mapper             = Substitute.For <IMapper>();

            _toDoListAppQuery = new ToDoListAppQuery(_toDoListRepository, _mapper);
        }
 public ManufacturingService(IStaticDataService staticService, IApiService apiService, IBlueprintRepository blueprintRepository, IToDoListRepository todoRepository)
 {
     _staticService = staticService;
     _apiService = apiService;
     _blueprintRepository = blueprintRepository;
     _todoRepository = todoRepository;
 }
Example #5
0
        public static IToDoListRepository CriarRepository(TipoRepository tipoRepository)
        {
            switch (tipoRepository)
            {
            case TipoRepository.Memoria:

                if (_toDoListRepository == null)
                {
                    _toDoListRepository = new ToDoListMemoriaRepository();
                }

                return(_toDoListRepository);

            case TipoRepository.Arquivo:

                if (_toDoListRepository == null)
                {
                    var diretorio = System.IO.Path.GetFullPath(@"..\..\..\Arquivo");
                    _toDoListRepository = new ToDoListArquivoRepository(diretorio, "TodoList.txt");
                }

                return(_toDoListRepository);

            default:
                return(null);
            }
        }
Example #6
0
 public ToDoListController(IToDoListRepository todolistRepository,
                           IHttpContextAccessor httpContextAccessor,
                           IHostingEnvironment hostingEnvironment)
 {
     _todolistRepository  = todolistRepository;
     _httpContextAccessor = httpContextAccessor;
     _hostingEnvironment  = hostingEnvironment;
 }
Example #7
0
 public GetAllToDoListHandler(IUnitOfWork unitOfWork,
                              IToDoListRepository toDoListRepository,
                              IOperatorUser operatorUser)
 {
     _unitOfWork         = unitOfWork;
     _toDoListRepository = toDoListRepository;
     _operatorUser       = operatorUser;
 }
Example #8
0
 public ListController(
     IUserRepository userRepository,
     IToDoListRepository listRepository,
     IMapper mapper
     )
 {
     _userRepository = userRepository;
     _listRepository = listRepository;
     _mapper         = mapper;
 }
Example #9
0
 public ToDoListController(IConfiguration config,
                           IToDoListRepository toDoRepository,
                           IUserRepository userRepository,
                           ITaskRepository taskRepository)
 {
     _config = config;
     this._toDoListRepository = toDoRepository;
     this._userRepository     = userRepository;
     this._taskRepository     = taskRepository;
 }
Example #10
0
        public ToDoListPresenter(IToDoList view, IToDoListRepository repository)
        {
            this.view       = view;
            this.repository = repository;

            view.Add    += AddItem;
            view.Remove += DeleteItem;

            view.UpdateList(repository.GetAllTasks());
        }
Example #11
0
        public ToDoListTest()
        {
            var options = new DbContextOptionsBuilder <ToDoContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString())
                          .Options;
            var dbContext = new ToDoContext(options);

            _toDoListRepository = new ToDoListRepository(dbContext);
            _unitOfWork         = new UnitOfWork(dbContext);
        }
Example #12
0
 public ToDoListController(IUnitOfWork unitOfWork,
                           IToDoListRepository toDoListRepository,
                           IMapper mapper,
                           IOperatorUser operatorUser)
 {
     _unitOfWork         = unitOfWork;
     _toDoListRepository = toDoListRepository;
     _mapper             = mapper;
     _operatorUser       = operatorUser;
 }
Example #13
0
 public ElementController(
     IElementRepository elementRepository,
     IToDoListRepository listRepository,
     IUserRepository userRepository,
     IMapper mapper
     )
 {
     _elementRepository = elementRepository;
     _listRepository    = listRepository;
     _userRepository    = userRepository;
     _mapper            = mapper;
 }
Example #14
0
 public UpdateService(IApiService apiService, IToDoListRepository todoRepository, IStaticDataService staticService, IIndustryJobUpdateService indyService, IAssetUpdateService assetUpdate, IInventionService inventionService, IManufacturingService manufacturingService, IMarketOrderUpdateService marketService, ITransactionService transactionService)
 {
     _apiService = apiService;
     _todoRepository = todoRepository;
     _staticService = staticService;
     _indyService = indyService;
     _assetUpdate = assetUpdate;
     _inventionService = inventionService;
     _manufacturingService = manufacturingService;
     _marketService = marketService;
     _transactionService = transactionService;
 }
Example #15
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            repository = new ToDoListJsonRepository();
            view       = new ToDoListView();
            //var view = new Test();

            var presenter = new ToDoListPresenter(view, repository);

            Application.Run(view);
        }
Example #16
0
 public ToDoShareController(IUnitOfWork unitOfWork,
                            ISysUserRepository sysUserRepository,
                            IToDoListRepository toDoListRepository,
                            IToDoShareRepository toDoShareRepository,
                            IMapper mapper,
                            IOperatorUser operatorUser,
                            IMailService mailService)
 {
     _unitOfWork          = unitOfWork;
     _sysUserRepository   = sysUserRepository;
     _toDoListRepository  = toDoListRepository;
     _toDoShareRepository = toDoShareRepository;
     _mapper       = mapper;
     _operatorUser = operatorUser;
     _mailService  = mailService;
 }
Example #17
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            programView = new ToDoList(); // view
            //Test programView = new Test();
            //repository = new ToDoListRepository();
            repository = new ToDoListJsonRepository();

            ToDoListPresenter programPresenter = new ToDoListPresenter(programView, repository); // presenter

            //programView.presenter = programPresenter;
            // programPresenter.view = programView;

            Application.Run(programView);
        }
Example #18
0
 public ToDo(IToDoListRepository todoListRepository, string texto)
 {
     _todoListRepository = todoListRepository;
     _texto = texto;
 }
 public ToDoListService(IToDoListRepository toDoListObject)
 {
     _ToDoListObject = toDoListObject;
 }
Example #20
0
 public AssetUpdateService(IToDoListRepository todoRepository, IApiService apiService)
 {
     _todoRepository = todoRepository;
     _apiService = apiService;
 }
Example #21
0
 public AddPresenter(IAddTaskView view, IToDoListRepository repository)
 {
     this.view       = view;
     this.repository = repository;
     view.Add       += AddItem;
 }
Example #22
0
 public RemoverTarefa(IToDoListRepository todoListRepository, IToDoList todoList)
 {
     _todoList           = todoList;
     _todoListRepository = todoListRepository;
 }
Example #23
0
 public ToDoApplication(IUserVerifier userVerifier, IToDoListCreator toDoListCreator, IToDoListRepository toDoListRepository)
 {
     this.userVerifier = userVerifier;
     this.toDoListCreator = toDoListCreator;
     this.toDoListRepository = toDoListRepository;
 }
 public ToDoListService(IToDoListRepository toDoListRepository)
 {
     _toDoListRepository = toDoListRepository;
 }
Example #25
0
 public AddTaskPresenter(IAddForm view, IToDoListRepository repository)
 {
     this.view       = view;
     this.repository = repository;
     view.Add       += AddTask;
 }
 public GetAllItemsHandler(IToDoListRepository todoListRepository, IMapper mapper)
 {
     _todoListRepository = todoListRepository;
     _mapper             = mapper;
 }
Example #27
0
 public ToDoListService(IUnitOfWork <DbContext> unitOfWork, IRepositoryFactory repositoryFactory)
 {
     _toDoListRepository = repositoryFactory.GeToDoListRepository();
     _unitOfWork         = unitOfWork;
 }
 public BlueprintRepository(IApiService apiService, IToDoListRepository todoRepository)
 {
     _apiService = apiService;
     _todoRepository = todoRepository;
 }
Example #29
0
 public ToDoListsController(IToDoListRepository todolistRepository)
 {
     this.todolistRepository = todolistRepository;
 }
Example #30
0
 public ToDoListService(IUnitOfWork unitOfWork, IToDoListRepository todoRep)
 {
     this.unitOfWork          = unitOfWork;
     this._ToDoListRepository = todoRep;
 }
Example #31
0
 public TransactionService(IApiService apiService, IToDoListRepository todoRepository)
 {
     _apiService = apiService;
     _todoRepository = todoRepository;
 }
Example #32
0
 public ToDoListsController(IToDoListRepository todolistRepository)
 {
     this.todolistRepository = todolistRepository;
 }
Example #33
0
 public ToDoListService(IToDoListRepository tdlRepository)
 {
     this.tdlRepository = tdlRepository;
 }
 public MarketOrderUpdateService(IToDoListRepository repository, IApiService apiService)
 {
     _repository = repository;
     _apiService = apiService;
 }
Example #35
0
 public ToDoListController(IToDoListRepository _toDoListRepository, ITaskRepository _taskRepository, IUserRepository _userRepository)
 {
     this.toDoListRepository = _toDoListRepository;
     this.taskRepository     = _taskRepository;
     this.userRepository     = _userRepository;
 }
Example #36
0
 public DayController(IToDoListRepository toDoListRepository, IAutoMapperWrapper autoMapperWrapper)
 {
     _toDoListRepository = toDoListRepository;
     _autoMapperWrapper  = autoMapperWrapper;
 }
Example #37
0
 public ToDoListController(IToDoListRepository listRepository, ITaskRepository taskRepository)
 {
     this.listRepository = listRepository;
     this.taskRepository = taskRepository;
 }
 public ToDoListService(IToDoListRepository toDoListRepository, IUserRepository userRepository)
 {
     _toDoListRepository = toDoListRepository;
     _userRepository = userRepository;
 }
 public IndustryJobUpdateService(IToDoListRepository todoRepository, IApiService apiService, IStaticRepository staticRepository)
 {
     _todoRepository = todoRepository;
     _apiService = apiService;
     _staticRepository = staticRepository;
 }
 public void Setup()
 {
     _toDoListItemRepository = new ToDoListItemRepository();
     _toDoListRepository     = new ToDoListRepository();
     ToDoLists.Lists.Clear();
 }