Exemplo n.º 1
0
 public OutfitService(IDbContextHelper dbContextHelper, CensusOutfit censusOutfit, CensusCharacter censusCharacter, ILogger <OutfitService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _censusOutfit    = censusOutfit;
     _censusCharacter = censusCharacter;
     _logger          = logger;
 }
Exemplo n.º 2
0
 public ZoneService(IDbContextHelper dbContextHelper, CensusZone censusZone, ISqlScriptRunner sqlScriptRunner, ILogger <ZoneService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _censusZone      = censusZone;
     _sqlScriptRunner = sqlScriptRunner;
     _logger          = logger;
 }
Exemplo n.º 3
0
 public static IList GetListData(DbContext db, string model, FilterGroup filter, string orderby, string EntityType = "Report")
 {
     try
     {
         Type entityType = GetEntityType(model, EntityType);
         if (entityType == null)
         {
             return(null);
         }
         IDbContextHelper helper           = db.GetHelper(entityType);
         FilterTranslator filterTranslator = new FilterTranslator();
         if (filter != null)
         {
             filterTranslator.Group = filter;
         }
         filterTranslator.Translate();
         string commandText = filterTranslator.CommandText;
         commandText = (string.IsNullOrEmpty(commandText) ? "" : ("where " + commandText));
         if (!string.IsNullOrEmpty(orderby))
         {
             commandText = commandText + " " + orderby;
         }
         return(helper.Fetch(commandText, filterTranslator.Parms.ToArray()));
     }
     catch (Exception)
     {
         return(null);
     }
 }
Exemplo n.º 4
0
 public PlayerHourlyLoadoutsController(IDbContextHelper dbContextHelper, IProfileService profileService, ICharacterService characterService, IFactionService factionService)
 {
     _dbContextHelper  = dbContextHelper;
     _profileService   = profileService;
     _characterService = characterService;
     _factionService   = factionService;
 }
        public PlayerLeaderboardController(IDbContextHelper dbContextHelper, ICharacterService characterService, PlayerLoginMemoryCache loginCache)
        {
            _dbContextHelper  = dbContextHelper;
            _characterService = characterService;

            _loginCache = loginCache.Cache;
        }
Exemplo n.º 6
0
 public ItemCategoryService(IDbContextHelper dbContextHelper, CensusItemCategory censusItemCategory, ISqlScriptRunner sqlScriptRunner, ILogger <ItemCategoryService> logger)
 {
     _dbContextHelper    = dbContextHelper;
     _censusItemCategory = censusItemCategory;
     _sqlScriptRunner    = sqlScriptRunner;
     _logger             = logger;
 }
Exemplo n.º 7
0
 public ProfileService(IDbContextHelper dbContextHelper, CensusProfile censusProfile, ISqlScriptRunner sqlScriptRunner, ILogger <ProfileService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _censusProfile   = censusProfile;
     _sqlScriptRunner = sqlScriptRunner;
     _logger          = logger;
 }
Exemplo n.º 8
0
 public FactionService(IDbContextHelper dbContextHelper, CensusFaction censusFaction, ISqlScriptRunner sqlScriptRunner, ILogger <FactionService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _censusFaction   = censusFaction;
     _sqlScriptRunner = sqlScriptRunner;
     _logger          = logger;
 }
 public WorldService(IDbContextHelper dbContextHelper, CensusWorld censusWorld, ISqlScriptRunner sqlScriptRunner, ILogger <ProfileService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _censusWorld     = censusWorld;
     _sqlScriptRunner = sqlScriptRunner;
     _logger          = logger;
 }
 public FacilityTypeService(IDbContextHelper dbContextHelper, CensusFacility censusFacility, ISqlScriptRunner sqlScriptRunner, ILogger <FacilityTypeService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _censusFacility  = censusFacility;
     _sqlScriptRunner = sqlScriptRunner;
     _logger          = logger;
 }
 public LoadoutService(IDbContextHelper dbContextHelper, CensusLoadout censusLoadout, ISqlScriptRunner sqlScriptRunner, ILogger <LoadoutService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _censusLoadout   = censusLoadout;
     _sqlScriptRunner = sqlScriptRunner;
     _logger          = logger;
 }
        public PlayerDetailsController(ICharacterService characterService, IDbContextHelper dbContextHelper, PlayerLoginMemoryCache loginCache)
        {
            _characterService = characterService;
            _dbContextHelper  = dbContextHelper;

            _loginCache = loginCache.Cache;
        }
Exemplo n.º 13
0
        public ScrimRulesetManager(IDbContextHelper dbContextHelper, IItemCategoryService itemCategoryService, ILogger <ScrimRulesetManager> logger)
        {
            _dbContextHelper     = dbContextHelper;
            _itemCategoryService = itemCategoryService;
            _logger = logger;

            _defaultRulesetId = 1;
        }
 public ConstructedTeamService(IDbContextHelper dbContextHelper, ICharacterService characterService, IScrimPlayersService playerService,
                               IScrimMessageBroadcastService messageService, ILogger <ConstructedTeamService> logger)
 {
     _dbContextHelper  = dbContextHelper;
     _characterService = characterService;
     _playerService    = playerService;
     _messageService   = messageService;
     _logger           = logger;
 }
Exemplo n.º 15
0
 public ManageController(
     ApplicationDbContext context,
     IDbContextHelper contextHelper,
     IWebHostEnvironment hostingEnv)
 {
     _context       = context;
     _contextHelper = contextHelper;
     _hostingEnv    = hostingEnv;
 }
Exemplo n.º 16
0
 public ItemService(IDbContextHelper dbContextHelper, IItemCategoryService itemCategoryService,
                    CensusItem censusItem, ISqlScriptRunner sqlScriptRunner, ILogger <ItemService> logger)
 {
     _dbContextHelper     = dbContextHelper;
     _itemCategoryService = itemCategoryService;
     _censusItem          = censusItem;
     _sqlScriptRunner     = sqlScriptRunner;
     _logger = logger;
 }
        public WebsocketEventHandler(IDbContextHelper dbContextHelper, ICharacterService characterService, ILogger <WebsocketEventHandler> logger)
        {
            _dbContextHelper  = dbContextHelper;
            _characterService = characterService;
            _logger           = logger;

            // Credit to Voidwell @ Lampjaw
            _processMethods = GetType()
                              .GetMethods(BindingFlags.Instance | BindingFlags.NonPublic)
                              .Where(m => m.GetCustomAttribute <CensusEventHandlerAttribute>() != null)
                              .ToDictionary(m => m.GetCustomAttribute <CensusEventHandlerAttribute>().EventName);
        }
        public ScrimRulesetManager(IDbContextHelper dbContextHelper, IItemCategoryService itemCategoryService, IItemService itemService, IRulesetDataService rulesetDataService, IScrimMessageBroadcastService messageService, ILogger <ScrimRulesetManager> logger)
        {
            _dbContextHelper     = dbContextHelper;
            _itemCategoryService = itemCategoryService;
            _itemService         = itemService;
            _rulesetDataService  = rulesetDataService;
            _messageService      = messageService;
            _logger = logger;

            _messageService.RaiseRulesetRuleChangeEvent += async(s, e) => await HandleRulesetRuleChangeMesssage(s, e);

            _messageService.RaiseRulesetSettingChangeEvent += HandleRulesetSettingChangeMessage;
            _messageService.RaiseRulesetOverlayConfigurationChangeEvent += HandleRulesetOverlayConfigurationChangeMessage;
        }
Exemplo n.º 19
0
        public static bool Exist(DbContext db, Type type, FilterGroup filter)
        {
            IDbContextHelper helper           = db.GetHelper(type);
            FilterTranslator filterTranslator = new FilterTranslator();

            if (filter != null)
            {
                filterTranslator.Group = filter;
            }
            filterTranslator.Translate();
            string commandText = filterTranslator.CommandText;

            commandText = (string.IsNullOrEmpty(commandText) ? "" : commandText);
            return(helper.Exist(commandText, filterTranslator.Parms.ToArray()));
        }
Exemplo n.º 20
0
 public GameController(
     ApplicationDbContext context,
     ICharacterItemsRepo characterItemsRepo,
     IItemRepo itemsRepo,
     IRarityRepo rarityRepo,
     IDbContextHelper contextHelper,
     ICharacterHelper characterHelper,
     IWebHostEnvironment hostEnv)
 {
     _context            = context;
     _characterItemsRepo = characterItemsRepo;
     _itemsRepo          = itemsRepo;
     _rarityRepo         = rarityRepo;
     _contextHelper      = contextHelper;
     _characterHelper    = characterHelper;
     _hostingEnv         = hostEnv;
 }
Exemplo n.º 21
0
        public static IList GetListData(DbContext db, Type type, string orderby, FilterGroup filter)
        {
            IDbContextHelper helper           = db.GetHelper(type);
            FilterTranslator filterTranslator = new FilterTranslator();

            if (filter != null)
            {
                filterTranslator.Group = filter;
            }
            filterTranslator.Translate();
            string commandText = filterTranslator.CommandText;

            commandText = (string.IsNullOrEmpty(commandText) ? "" : ("where " + commandText));
            if (!string.IsNullOrEmpty(orderby))
            {
                commandText = commandText + " " + orderby;
            }
            return(helper.Fetch(commandText, filterTranslator.Parms.ToArray()));
        }
 public ItemService(IDbContextHelper dbContextHelper, CensusItemCategory censusItemCategory, CensusItem censusItem)
 {
     _dbContextHelper    = dbContextHelper;
     _censusItemCategory = censusItemCategory;
     _censusItem         = censusItem;
 }
Exemplo n.º 23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SeatController"/> class
 /// </summary>
 public SeatController(IDbContextHelper <SeatBookingContext> bookingContextHelper)
 {
     lazyBookingContextHelper = new Lazy <IDbContextHelper <SeatBookingContext> >(
         () => bookingContextHelper);
     InitializeTestSeats();
 }
Exemplo n.º 24
0
 public ZoneService(IDbContextHelper dbContextHelper, ILogger <ZoneService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _logger          = logger;
 }
 public ProfileService(IDbContextHelper dbContextHelper, CensusProfile censusProfile, CensusLoadout censusLoadout)
 {
     _dbContextHelper = dbContextHelper;
     _censusProfile   = censusProfile;
     _censusLoadout   = censusLoadout;
 }
Exemplo n.º 26
0
 public WorldService(IDbContextHelper dbContextHelper, ILogger <WorldService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _logger          = logger;
 }
Exemplo n.º 27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SeatController"/> class
 /// </summary>
 public MeetupController(IDbContextHelper <SeatBookingContext> bookingContextHelper)
 {
     lazyBookingContextHelper = new Lazy <IDbContextHelper <SeatBookingContext> >(() => bookingContextHelper);
 }
Exemplo n.º 28
0
 public PlayerHourlyHeadToHeadController(IDbContextHelper dbContextHelper, ICharacterService characterService)
 {
     _dbContextHelper  = dbContextHelper;
     _characterService = characterService;
 }
Exemplo n.º 29
0
 public EventRepository(IDbContextHelper context)
 {
     _context = context;
 }
 public ScrimMatchReportDataService(IDbContextHelper dbContextHelper, ILogger <ScrimMatchReportDataService> logger)
 {
     _dbContextHelper = dbContextHelper;
     _logger          = logger;
 }