Example #1
0
 public CardService(IReadWriteRepository <Card, StarWarsDestinyContext> repository,
                    IDieService dieService, IDiceFaceService diceFaceService) : base(repository)
 {
     _repository      = repository;
     _dieService      = dieService;
     _diceFaceService = diceFaceService;
 }
 public ActionService(IReadWriteRepository <Action, StarWarsDestinyContext> repository,
                      IGameService gameService, ICardService cardService, IPlayerRoundService playerRoundService) : base(repository)
 {
     _gameService        = gameService;
     _cardService        = cardService;
     _playerRoundService = playerRoundService;
 }
Example #3
0
 public SharesController(IReadWriteRepository <ServiceData.Models.Photo> photoRepository, IReadWriteRepository <ServiceData.Models.UserCondition> conditionRepository, IReadWriteRepository <ServiceData.Models.EventLog> logRepository, IReadWriteRepository <ServiceData.Models.User> userRepository, IReadWriteRepository <ServiceData.Models.Share> shareRepository)
 {
     _photoRepository     = photoRepository;
     _conditionRepository = conditionRepository;
     _logRepository       = logRepository;
     _userRepository      = userRepository;
     _shareRepository     = shareRepository;
 }
Example #4
0
 public PlayerRoundService(IReadWriteRepository <PlayerRound, StarWarsDestinyContext> repository,
                           IPlayerRoundCardInPlayService playerRoundCardInPlayService,
                           IPlayerRoundCardInHandService playerRoundCardInHandService,
                           IPlayerRoundCardInLimboService playerRoundCardInLimboService) : base(repository)
 {
     _repository = repository;
     _playerRoundCardInPlayService  = playerRoundCardInPlayService;
     _playerRoundCardInHandService  = playerRoundCardInHandService;
     _playerRoundCardInLimboService = playerRoundCardInLimboService;
 }
 public StudiesController(IReadWriteRepository <ServiceData.Models.EventLog> logRepository,
                          IReadWriteRepository <ServiceData.Models.User> userRepository,
                          IReadWriteRepository <ServiceData.Models.StudyEnrolment> studyEnrolmentRepository,
                          IReadWriteRepository <ServiceData.Models.Study> studyRepository)
 {
     _logRepository            = logRepository;
     _userRepository           = userRepository;
     _studyEnrolmentRepository = studyEnrolmentRepository;
     _studyRepository          = studyRepository;
 }
Example #6
0
        public UnitOfWork(IDbContext dbContext,
                          IReadWriteRepository <Student> students,
                          IReadWriteRepository <Enrollment> enrollments,
                          IReadWriteRepository <Course> courses)
        {
            Students    = students;
            Enrollments = enrollments;
            Courses     = courses;

            _dbContext = dbContext;
        }
Example #7
0
 public AdminController(IUserStore <IdentityUser> users,
                        IReadWriteRepository readWriteRepository,
                        IReadOnlyRepository readOnlyRepository,
                        IMapper mapper)
     : base(users, readOnlyRepository, mapper)
 {
     _users = users;
     _readWriteRepository = readWriteRepository;
     _readOnlyRepository  = readOnlyRepository;
     _mapper = mapper;
 }
Example #8
0
 public AdminController(
     IIdentityServerInteractionService interaction,
     IClientStore clientStore,
     IAuthenticationSchemeProvider schemeProvider,
     IEventService events,
     IUserStore <IdentityUser> users,
     IReadWriteRepository readWriteRepository,
     IReadOnlyRepository readOnlyRepository)
 {
     _interaction         = interaction;
     _clientStore         = clientStore;
     _schemeProvider      = schemeProvider;
     _events              = events;
     _users               = users;
     _readWriteRepository = readWriteRepository;
     _readOnlyRepository  = readOnlyRepository;
 }
        public static async Task Delete(IReadWriteRepository <ServiceData.Models.UserCondition> conditionRep, IReadWriteRepository <ServiceData.Models.Share> shareRep, IReadWriteRepository <ServiceData.Models.Photo> photoRep, int id)
        {
            ServiceData.Models.UserCondition found = conditionRep.GetById(id);
            if (found == null)
            {
                return;
            }

            ServiceData.Models.Share[] foundShares = shareRep.Search(sh => sh.UserCondition.Id == found.Id).ToArray();
            foreach (ServiceData.Models.Share share in foundShares)
            {
                await shareRep.Delete(share.Id);
            }

            CloudBlobContainer container = await UploadController.GetBlobContainer();

            foreach (ServiceData.Models.Photo photo in found.Photos)
            {
                await PhotoController.Delete(photoRep, photo.Id);
            }

            await conditionRep.Delete(id);
        }
Example #10
0
 private void Initialize(IReadWriteRepository <Rant> readWriteRepository,
                         IReadRepository <Emotion> readRepository = null)
 {
     if (readWriteRepository != null)
     {
         _readWriteRepository = readWriteRepository;
     }
     if (readRepository != null)
     {
         _readRepository = readRepository;
     }
     if (Rants == null)
     {
         Rants = new List <Rant>();
     }
     if (Reactions == null)
     {
         Reactions = new List <Reaction>();
     }
     if (Emotions == null && _readRepository != null)
     {
         Emotions = new EmotionListModel(_readRepository);
     }
 }
Example #11
0
        public static async Task Delete(IReadWriteRepository <ServiceData.Models.Photo> photoRep, int id)
        {
            ServiceData.Models.Photo found = photoRep.GetById(id);

            CloudBlobContainer container = await UploadController.GetBlobContainer();

            try
            {
                string url      = UploadController.GetFilePathFromUrl(found.Url);
                var    mainBlob = container.GetBlockBlobReference(url);
                mainBlob.Delete();
            }
            catch { }

            try
            {
                string thumbUrl  = UploadController.GetFilePathFromUrl(found.ThumbUrl);
                var    thumbBlob = container.GetBlockBlobReference(thumbUrl);
                thumbBlob.Delete();
            }
            catch { }

            await photoRep.Delete(id);
        }
Example #12
0
 public BalanceForceService(IReadWriteRepository <BalanceForce, StarWarsDestinyContext> repository,
                            ICardLegalityService cardLegalityService) : base(repository)
 {
     _repository          = repository;
     _cardLegalityService = cardLegalityService;
 }
Example #13
0
 public SetStarWarsService(IReadWriteRepository <SetStarWars, StarWarsDestinyContext> repository) : base(repository)
 {
 }
 public StatusService(IReadWriteRepository <Status, CrawlerContext> repository) : base(repository)
 {
 }
Example #15
0
 public RarityService(IReadWriteRepository <Rarity, StarWarsDestinyContext> repository) : base(repository)
 {
 }
 public PlayerService(IReadWriteRepository <Player, StarWarsDestinyContext> repository) : base(repository)
 {
 }
 public CustomerController(IReadWriteRepository <Customer> readWriteRepository) : base(readWriteRepository)
 {
 }
Example #18
0
 public ProductionController(IReadWriteRepository <Production> productionRepository)
 {
     _productionRepository = productionRepository;
 }
 public VirtualMachineService(IReadWriteRepository <VirtualMachine> virtualMachineRepository)
 {
     _virtualMachineRepository = virtualMachineRepository;
 }
Example #20
0
 public ColaboradorService(IReadWriteRepository <Colaborador, SimpleId <int> > repository, ICrudValidator <Colaborador> validators) :
     base(repository, validators)
 {
 }
 public EventLogController(IReadWriteRepository <ServiceData.Models.EventLog> logRepository, IReadWriteRepository <ServiceData.Models.User> userRepository)
 {
     _logRepository  = logRepository;
     _userRepository = userRepository;
 }
Example #22
0
 public RantViewModel(IReadWriteRepository <Rant> readWriteRepository)
 {
     Initialize(readWriteRepository);
 }
Example #23
0
 public RantViewModel(IReadWriteRepository <Rant> readWriteRepository, IReadRepository <Emotion> readRepository)
 {
     Initialize(readWriteRepository, readRepository);
 }
Example #24
0
 public LancamentoService(IReadWriteRepository <Lancamento, SimpleId <int> > repository, ICrudValidator <Lancamento> validators) :
     base(repository, validators)
 {
 }
Example #25
0
 public UpdateExampleUseCase(IReadWriteRepository <Example> exampleRepository)
 {
     this.exampleRepository = exampleRepository;
 }
Example #26
0
 public ColorService(IReadWriteRepository <Color, StarWarsDestinyContext> repository) : base(repository)
 {
 }
 public DieService(IReadWriteRepository <Die, StarWarsDestinyContext> repository) : base(repository)
 {
 }
 public ProjetoService(IReadWriteRepository <Projeto, SimpleId <int> > repository, ICrudValidator <Projeto> validators) :
     base(repository, validators)
 {
 }
 protected BaseReadWriteController(IReadWriteRepository <TModel> repository) : base(repository)
 {
     this._repository = repository;
 }
Example #30
0
 public AffiliationService(IReadWriteRepository <Affiliation, StarWarsDestinyContext> repository) : base(repository)
 {
 }