예제 #1
0
 public WorldController(INationRepository nationRepository, IRegionRepository regionRepository, ISessionRepository sessionRepository, IWorldRepository worldRepository)
 {
     NationRepository  = nationRepository;
     RegionRepository  = regionRepository;
     SessionRepository = sessionRepository;
     WorldRepository   = worldRepository;
 }
예제 #2
0
 public RegionController(ICommandQueue commandQueue, INationRepository nationRepository, IRegionRepository regionRepository, ISessionRepository sessionRepository, IUserRepository userRepository)
 {
     CommandQueue      = commandQueue;
     NationRepository  = nationRepository;
     RegionRepository  = regionRepository;
     SessionRepository = sessionRepository;
     UserRepository    = userRepository;
 }
예제 #3
0
파일: Player.cs 프로젝트: StephenE/DevoLAN
        static public async Task <INationData> GetNationOrThrow(this INationRepository repository, Guid sessionId, String userId)
        {
            INationData playerInSession = await repository.GetNation(sessionId, userId);

            if (playerInSession == null)
            {
                throw new HttpResponseException(new HttpResponseMessage {
                    StatusCode = HttpStatusCode.Unauthorized, ReasonPhrase = "You have not joined the specified session"
                });
            }
            return(playerInSession);
        }
예제 #4
0
        public ImportedConflictProcessor(
            INationRepository nationsRepository,
            IReadAll <ImportedConflictModel> readAllImportedConflictsRepository,
            IParseImportedConflictSummary parser)
        {
            Argument.AssertIsNotNull(nationsRepository, nameof(nationsRepository));
            Argument.AssertIsNotNull(readAllImportedConflictsRepository, nameof(readAllImportedConflictsRepository));
            Argument.AssertIsNotNull(parser, nameof(parser));

            this.nationsRepository = nationsRepository;
            this.readAllImportedConflictsRepository = readAllImportedConflictsRepository;
            this.parser = parser;
        }
예제 #5
0
 public NationController(INationRepository nationRepository, ISessionRepository sessionRepository)
 {
     NationRepository  = nationRepository;
     SessionRepository = sessionRepository;
 }
예제 #6
0
 public NationsController(INationRepository repo)
 {
     this.repo = repo;
 }
예제 #7
0
 public NationService(INationRepository nationRepository, IMapper mapper)
 {
     _nationRepository = nationRepository;
     _IMapper          = mapper;
 }
예제 #8
0
 public NationController(ILogger <NationController> logger,
                         INationRepository nationRepository)
 {
     _logger = logger;
     this.nationRepository = nationRepository;
 }