public RecipesController(ISharedRepository sharedRepository, IRecipeRepository recipeRepository, ICategoryRepository categoryRepository, IHostingEnvironment hostingEnvironment) : base(sharedRepository) { RecipeRepository = recipeRepository; CategoryRepository = categoryRepository; HostingEnvironment = hostingEnvironment; }
public SharedService( AppSetting appSetting, ISharedRepository sharedRepository) { this._appSetting = appSetting; this._sharedRepository = sharedRepository; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure( IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, ISharedRepository sharedRepo) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); //app.UseCors(builder => builder.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin().AllowCredentials()); app.UseCookieAuthentication(new CookieAuthenticationOptions() { AuthenticationScheme = sharedRepo.AuthenticationScheme, AutomaticAuthenticate = true }); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseDefaultFiles(); app.UseStaticFiles(); app.UseMvc(); }
/// <summary> /// Initializes a new instance of the <see cref="GameService"/> class. /// </summary> /// <param name="gameRepository">The repository by which game data will be accessed.</param> /// <param name="processGameStrategyFactory">The factory that will initialize the needed <see cref="ProcessGameStrategyBase"/> subclass.</param> public GameService(IGameRepository gameRepository, ISharedRepository sharedRepository, IProcessGameStrategyFactory processGameStrategyFactory) { _gameRepository = gameRepository; _sharedRepository = sharedRepository; _processGameStrategyFactory = processGameStrategyFactory; }
public UserController( ISharedRepository sharedRepo, IUserRepository userRepo) { _sharedRepo = sharedRepo; _userRepo = userRepo; }
public GroupController(IGroupRepository repository, ISharedRepository sharedRepository, IRedisConnectionBuilder builder, IDocumentRepository documentrepository) { _documentrepository = documentrepository; _repository = repository; _sharedRepository = sharedRepository; _redisConnection = builder.Connection; }
/// <summary> /// Initializes a new instance of the <see cref="LeagueSeasonsController"/> class. /// </summary> /// <param name="leagueSeasonRepository">The repository by which league season data will be accessed.</param> /// <param name="sharedRepository">The repository by which shared data resources will be accessed.</param> /// <param name="mapper">The AutoMapper object used for object-object mapping.</param> /// <param name="linkGenerator">The <see cref="LinkGenerator"/> object used to generate URLs.</param> public LeagueSeasonsController(ILeagueSeasonRepository leagueSeasonRepository, ISharedRepository sharedRepository, IMapper mapper, LinkGenerator linkGenerator) { _leagueSeasonRepository = leagueSeasonRepository; _sharedRepository = sharedRepository; _mapper = mapper; _linkGenerator = linkGenerator; }
public VacancyController(IVacancyRepository repository, ISharedRepository sharedRepository, IMapper mapper, UserManager <User> userManager) { _repo = repository; _sharedRepo = sharedRepository; _mapper = mapper; _user = userManager; }
/// <summary> /// Initializes a new instance of the <see cref="SeasonsController"/> class. /// </summary> /// <param name="seasonRepository">The repository by which season data will be accessed.</param> /// <param name="sharedRepository">The repository by which shared data resources will be accessed.</param> /// <param name="mapper">The AutoMapper object used for object-object mapping.</param> /// <param name="linkGenerator">The <see cref="LinkGenerator"/> object used to generate URLs.</param> public SeasonsController(ISeasonRepository seasonRepository, ISharedRepository sharedRepository, IMapper mapper, LinkGenerator linkGenerator) { _seasonRepository = seasonRepository; _sharedRepository = sharedRepository; _mapper = mapper; _linkGenerator = linkGenerator; }
/// <summary> /// Initializes a new instance of the <see cref="TeamSeasonsController"/> class. /// </summary> /// <param name="teamSeasonRepository">The repository by which team season data will be accessed.</param> /// <param name="sharedRepository">The repository by which shared data resources will be accessed.</param> /// <param name="mapper">The AutoMapper object used for object-object mapping.</param> /// <param name="linkGenerator">The <see cref="LinkGenerator"/> object used to generate URLs.</param> public TeamSeasonsController(ITeamSeasonRepository teamSeasonRepository, ISharedRepository sharedRepository, IMapper mapper, LinkGenerator linkGenerator) { _teamSeasonRepository = teamSeasonRepository; _sharedRepository = sharedRepository; _mapper = mapper; _linkGenerator = linkGenerator; }
/// <summary> /// Initializes a new instance of the <see cref="GamesController"/> class. /// </summary> /// <param name="gameRepository"> /// The <see cref="IGameRepository"/> by which game data will be accessed. /// </param> /// <param name="sharedRepository"> /// The <see cref="ISharedRepository"/> by which shared data resources will be accessed. /// </param> /// <param name="mapper"> /// The <see cref="IMapper"/> object used for object-object mapping. /// </param> /// <param name="linkGenerator"> /// The <see cref="LinkGenerator"/> object used to generate URLs. /// </param> /// <param name="gameService"> /// The <see cref="IGameService"/> object used to process game data. /// </param> public GamesController(IGameRepository gameRepository, ISharedRepository sharedRepository, IMapper mapper, LinkGenerator linkGenerator, IGameService gameService) { _gameRepository = gameRepository; _sharedRepository = sharedRepository; _mapper = mapper; _linkGenerator = linkGenerator; _gameService = gameService; }
/// <summary> /// Initializes a new instance of the <see cref="TeamSeasonsAdminController"/> class. /// </summary> /// <param name="teamSeasonsIndexViewModel"> /// The <see cref="ITeamSeasonsIndexViewModel"/> that will provide ViewModel data to the Index view. /// </param> /// <param name="teamSeasonsDetailsViewModel"> /// The <see cref="ITeamSeasonsDetailsViewModel"/> that will provide ViewModel data to the Details view. /// </param> /// <param name="teamSeasonRepository"> /// The <see cref="ITeamSeasonRepository"/> by which league data will be accessed. /// </param> /// <param name="sharedRepository"> /// The <see cref="ISharedRepository"/> by which shared data resources will be accessed. /// </param> public TeamSeasonsAdminController( ITeamSeasonsIndexViewModel teamSeasonsIndexViewModel, ITeamSeasonsDetailsViewModel teamSeasonsDetailsViewModel, ITeamSeasonRepository teamSeasonRepository, ISharedRepository sharedRepository) { _teamSeasonsIndexViewModel = teamSeasonsIndexViewModel; _teamSeasonsDetailsViewModel = teamSeasonsDetailsViewModel; _teamSeasonRepository = teamSeasonRepository; _sharedRepository = sharedRepository; }
/// <summary> /// Initializes a new instance of the <see cref="SeasonsController"/> class. /// </summary> /// <param name="seasonsIndexViewModel"> /// The <see cref="ISeasonsIndexViewModel"/> that will provide ViewModel data to the Index view. /// </param> /// <param name="seasonsDetailsViewModel"> /// The <see cref="ISeasonsDetailsViewModel"/> that will provide ViewModel data to the Details view. /// </param> /// <param name="seasonRepository"> /// The <see cref="ISeasonRepository"/> by which season data will be accessed. /// </param> /// <param name="sharedRepository"> /// The <see cref="ISharedRepository"/> by which shared data resources will be accessed. /// </param> public SeasonsController( ISeasonsIndexViewModel seasonsIndexViewModel, ISeasonsDetailsViewModel seasonsDetailsViewModel, ISeasonRepository seasonRepository, ISharedRepository sharedRepository) { _seasonsIndexViewModel = seasonsIndexViewModel; _seasonsDetailsViewModel = seasonsDetailsViewModel; _seasonRepository = seasonRepository; _sharedRepository = sharedRepository; }
/// <summary> /// Initializes a new instance of the <see cref="TeamsController"/> class. /// </summary> /// <param name="teamsIndexViewModel"> /// The <see cref="ITeamsIndexViewModel"/> that will provide ViewModel data to the Index view. /// </param> /// <param name="teamsDetailsViewModel"> /// The <see cref="ITeamsDetailsViewModel"/> that will provide ViewModel data to the Details view. /// </param> /// <param name="teamRepository"> /// The <see cref="ITeamRepository"/> by which team data will be accessed. /// </param> /// <param name="sharedRepository"> /// The <see cref="ISharedRepository"/> by which shared data resources will be accessed. /// </param> public TeamsController( ITeamsIndexViewModel teamsIndexViewModel, ITeamsDetailsViewModel teamsDetailsViewModel, ITeamRepository teamRepository, ISharedRepository sharedRepository) { _teamsIndexViewModel = teamsIndexViewModel; _teamsDetailsViewModel = teamsDetailsViewModel; _teamRepository = teamRepository; _sharedRepository = sharedRepository; }
/// <summary> /// Initializes a new instance of the <see cref="DivisionsController"/> class. /// </summary> /// <param name="divisionsIndexViewModel"> /// The <see cref="IDivisionsIndexViewModel"/> that will provide ViewModel data to the Index view. /// </param> /// <param name="divisionsDetailsViewModel"> /// The <see cref="IDivisionsDetailsViewModel"/> that will provide ViewModel data to the Details view. /// </param> /// <param name="divisionRepository"> /// The <see cref="IDivisionRepository"/> by which division data will be accessed. /// </param> /// <param name="sharedRepository"> /// The <see cref="ISharedRepository"/> by which shared data resources will be accessed. /// </param> public DivisionsController( IDivisionsIndexViewModel divisionsIndexViewModel, IDivisionsDetailsViewModel divisionsDetailsViewModel, IDivisionRepository divisionRepository, ISharedRepository sharedRepository) { _divisionsIndexViewModel = divisionsIndexViewModel; _divisionsDetailsViewModel = divisionsDetailsViewModel; _divisionRepository = divisionRepository; _sharedRepository = sharedRepository; }
public ApplicationController(IApplicationRepository applicationRespository, IMapper mapper, UserManager <User> userManager, ISharedRepository sharedRepository, IWebHostEnvironment host, IOptionsSnapshot <ApplicationSettings> options) { _repo = applicationRespository; _mapper = mapper; _user = userManager; _sharedRepo = sharedRepository; _host = host; _applicationSettings = options.Value; }
/// <summary> /// Initializes a new instance of the <see cref="LeaguesController"/> class. /// </summary> /// <param name="leaguesIndexViewModel"> /// The <see cref="ILeaguesIndexViewModel"/> that will provide ViewModel data to the Index view. /// </param> /// <param name="leaguesDetailsViewModel"> /// The <see cref="ILeaguesDetailsViewModel"/> that will provide ViewModel data to the Details view. /// </param> /// <param name="leagueRepository"> /// The <see cref="ILeagueRepository"/> by which league data will be accessed. /// </param> /// <param name="sharedRepository"> /// The <see cref="ISharedRepository"/> by which shared data resources will be accessed. /// </param> public LeaguesController( ILeaguesIndexViewModel leaguesIndexViewModel, ILeaguesDetailsViewModel leaguesDetailsViewModel, ILeagueRepository leagueRepository, ISharedRepository sharedRepository) { _leaguesIndexViewModel = leaguesIndexViewModel; _leaguesDetailsViewModel = leaguesDetailsViewModel; _leagueRepository = leagueRepository; _sharedRepository = sharedRepository; }
/// <summary> /// Initializes a new instance of the <see cref="ConferencesController"/> class. /// </summary> /// <param name="conferencesIndexViewModel"> /// The <see cref="IConferencesIndexViewModel"/> that will provide ViewModel data to the Index view. /// </param> /// <param name="conferencesDetailsViewModel"> /// The <see cref="IConferencesDetailsViewModel"/> that will provide ViewModel data to the Details view. /// </param> /// <param name="conferenceRepository"> /// The <see cref="IConferenceRepository"/> by which conference data will be accessed. /// </param> /// <param name="sharedRepository"> /// The <see cref="ISharedRepository"/> by which shared data resources will be accessed. /// </param> public ConferencesController( IConferencesIndexViewModel conferencesIndexViewModel, IConferencesDetailsViewModel conferencesDetailsViewModel, IConferenceRepository conferenceRepository, ISharedRepository sharedRepository) { _conferencesIndexViewModel = conferencesIndexViewModel; _conferencesDetailsViewModel = conferencesDetailsViewModel; _conferenceRepository = conferenceRepository; _sharedRepository = sharedRepository; }
public SharedController(ISharedRepository shareRepo, IRepoForOnSite onsiteRepo, IOptions <localconfig> config) { this.shareRepo = shareRepo; this.onsiteRepo = onsiteRepo; //blobStorage = System.Configuration.ConfigurationSettings.AppSettings.Get("blobStorage"); //blobLogoStorage = System.Configuration.ConfigurationSettings.AppSettings.Get("blobLogoStorage"); //logoextension = System.Configuration.ConfigurationSettings.AppSettings.Get("logoextension"); //root = System.Configuration.ConfigurationSettings.AppSettings.Get("root"); //config = System.Configuration.ConfigurationSettings.AppSettings.Get("config"); //storageCon = System.Configuration.ConfigurationSettings.AppSettings.Get("StorageConnectionString"); this.config = config.Value; }
/// <summary> /// Constructor where all dependencies are injected /// </summary> /// <param name="errorSettings"></param> /// <param name="sharedSettings"></param> /// <param name="matterCenterServiceFunctions"></param> /// <param name="customLogger"></param> /// <param name="logTables"></param> /// <param name="sharedRepository"></param> public SharedController(IOptions<ErrorSettings> errorSettings, IOptions<SharedSettings> sharedSettings, IMatterCenterServiceFunctions matterCenterServiceFunctions, ICustomLogger customLogger, IOptions<LogTables> logTables, ISharedRepository sharedRepository ) { this.errorSettings = errorSettings.Value; this.matterCenterServiceFunctions = matterCenterServiceFunctions; this.sharedRepository = sharedRepository; this.customLogger = customLogger; this.logTables = logTables.Value; this.sharedSettings = sharedSettings.Value; }
/// <summary> /// Constructor where all dependencies are injected /// </summary> /// <param name="errorSettings"></param> /// <param name="sharedSettings"></param> /// <param name="matterCenterServiceFunctions"></param> /// <param name="customLogger"></param> /// <param name="logTables"></param> /// <param name="sharedRepository"></param> public SharedController(IOptions <ErrorSettings> errorSettings, IOptions <SharedSettings> sharedSettings, IMatterCenterServiceFunctions matterCenterServiceFunctions, ICustomLogger customLogger, IOptions <LogTables> logTables, ISharedRepository sharedRepository ) { this.errorSettings = errorSettings.Value; this.matterCenterServiceFunctions = matterCenterServiceFunctions; this.sharedRepository = sharedRepository; this.customLogger = customLogger; this.logTables = logTables.Value; this.sharedSettings = sharedSettings.Value; }
/// <summary> /// Initializes a new instance of the <see cref="TeamSeasonsController"/> class. /// </summary> /// <param name="teamSeasonsIndexViewModel"> /// The <see cref="ITeamSeasonsIndexViewModel"/> that will provide data to the TeamSeasons index view. /// </param> /// <param name="teamSeasonsDetailsViewModel"> /// The <see cref="ITeamSeasonsDetailsViewModel"/> that will provide data to the TeamSeasons details view. /// </param> /// <param name="seasonRepository"> /// The <see cref="ISeasonRepository"/> by which season data will be accessed. /// </param> /// <param name="teamSeasonRepository"> /// The <see cref="ITeamSeasonRepository"/> by which team season data will be accessed. /// </param> /// <param name="teamSeasonScheduleProfileRepository"> /// The <see cref="ITeamSeasonScheduleProfileRepository"/> by which team season schedule profile data will be /// accessed. /// </param> /// <param name="teamSeasonScheduleTotalsRepository"> /// The <see cref="ITeamSeasonScheduleTotalsRepository"/> by which team season schedule totals data will be /// accessed. /// </param> /// <param name="teamSeasonScheduleAveragesRepository"> /// The <see cref="ITeamSeasonScheduleAveragesRepository"/> by which team season schedule averages data will be /// accessed. /// </param> /// <param name="sharedRepository"> /// The <see cref="ISharedRepository"/> by which shared data resources will be accessed. /// </param> /// <param name="weeklyUpdateService"> /// The <see cref="IWeeklyUpdateService"/> that will run weekly updates of the data store. /// </param> public TeamSeasonsController( ITeamSeasonsIndexViewModel teamSeasonsIndexViewModel, ITeamSeasonsDetailsViewModel teamSeasonsDetailsViewModel, ISeasonRepository seasonRepository, ITeamSeasonRepository teamSeasonRepository, ITeamSeasonScheduleRepository teamSeasonScheduleRepository, ISharedRepository sharedRepository, IWeeklyUpdateService weeklyUpdateService) { _teamSeasonsIndexViewModel = teamSeasonsIndexViewModel; _teamSeasonsDetailsViewModel = teamSeasonsDetailsViewModel; _seasonRepository = seasonRepository; _teamSeasonRepository = teamSeasonRepository; _teamSeasonScheduleRepository = teamSeasonScheduleRepository; _sharedRepository = sharedRepository; _weeklyUpdateService = weeklyUpdateService; }
/// <summary> /// Initializes a new instance of the <see cref="WeeklyUpdateService"/> class. /// </summary> /// <param name="seasonRepository">The repository by which WeekCount data will be accessed.</param> /// <param name="gameRepository">The repository by which Game data will be accessed.</param> /// <param name="leagueSeasonRepository">The repository by which LeagueSeason data will be accessed.</param> /// <param name="leagueSeasonTotalsRepository">The repository by which LeagueSeasonTotals data will be accessed.</param> /// <param name="teamSeasonRepository">The repository by which TeamSeason data will be accessed.</param> /// <param name="teamSeasonScheduleTotalsRepository">The repository by which TeamSeasonScheduleTotals data will be accessed.</param> /// <param name="teamSeasonScheduleAveragesRepository">The repository by which TeamSeasonScheduleAverages data will be accessed.</param> /// <param name="sharedRepository">The repository by which data will be accessed.</param> public WeeklyUpdateService( ISeasonRepository seasonRepository, IGameRepository gameRepository, ILeagueSeasonRepository leagueSeasonRepository, ILeagueSeasonTotalsRepository leagueSeasonTotalsRepository, ITeamSeasonRepository teamSeasonRepository, ITeamSeasonScheduleRepository teamSeasonScheduleRepository, ISharedRepository sharedRepository) { _seasonRepository = seasonRepository; _gameRepository = gameRepository; _leagueSeasonRepository = leagueSeasonRepository; _leagueSeasonTotalsRepository = leagueSeasonTotalsRepository; _teamSeasonRepository = teamSeasonRepository; _teamSeasonScheduleRepository = teamSeasonScheduleRepository; _sharedRepository = sharedRepository; }
/// <summary> /// Initializes a new instance of the <see cref="GamesController"/> class. /// </summary> /// <param name="gameService"> /// The <see cref="IGameService"/> for processing Game data. /// </param> /// <param name="gameRepository"> /// The <see cref="IGameRepository"/> by which game data will be accessed. /// </param> /// <param name="teamRepository"> /// The <see cref="ITeamRepository"/> by which team data will be accessed. /// </param> /// <param name="seasonRepository"> /// The <see cref="ISeasonRepository"/> by which season data will be accessed. /// </param> /// <param name="sharedRepository"> /// The <see cref="ISharedRepository"/> by which shared data resources will be accessed. /// </param> public GamesController( IGamesIndexViewModel gamesIndexViewModel, IGamesDetailsViewModel gamesDetailsViewModel, IGameService gameService, IGameRepository gameRepository, ITeamRepository teamRepository, ISeasonRepository seasonRepository, ISharedRepository sharedRepository) { _gamesIndexViewModel = gamesIndexViewModel; _gamesDetailsViewModel = gamesDetailsViewModel; _gameService = gameService; _gameRepository = gameRepository; _teamRepository = teamRepository; _seasonRepository = seasonRepository; _sharedRepository = sharedRepository; }
public SharedService(ISharedRepository sharedRepository) { _sharedRepository = sharedRepository; }
public AuthRepository(ILogger <AuthRepository> logger, ApplicationDbContext context, ISharedRepository sharedRepository) { _logger = logger; _ctx = context; _sharedRepo = sharedRepository; }
public HomeController(ISharedRepository sharedRepository) : base(sharedRepository) { }
public CreateModel(ILeagueRepository leagueRepository, ISharedRepository sharedRepository) { _leagueRepository = leagueRepository; _sharedRepository = sharedRepository; }
public VacancyRepository(TalentHuntContext context, ISharedRepository sharedRepository) { _ctx = context; _sharedRepo = sharedRepository; }
protected BaseController(ISharedRepository sharedRepository) { SharedRepository = sharedRepository; }
public void Execute(IJobExecutionContext context) { Debug.WriteLine("Service Checker Started"); try { List <ServerDetailModel> serverList = new List <ServerDetailModel>(); List <ServerDetailModel> serverJobStatus = new List <ServerDetailModel>(); DbConnection c = new SqlConnection("Data Source=.;Initial Catalog=FileEncryption;Integrated Security=True"); ISharedRepository i = c.As <ISharedRepository>(); serverList = i.GetServerDetails(); Int64 jobId = i.StartServerStatusJob(); Console.WriteLine($"Server Status Checking started for {serverList.Count} Servers"); Parallel.ForEach(serverList, address => { try { Ping myPing = new Ping(); PingReply reply = myPing.Send(address.ServerIPAddress, 5000); if (reply != null) { Console.WriteLine("Status : " + reply.Status + " \n Time : " + reply.RoundtripTime.ToString() + " \n Address : " + reply.Address); } address.ServerStatus = reply.Status.ToString(); address.JobId = jobId; address.CreatedOn = DateTime.Now; address.UpdatedOn = DateTime.Now; lock (serverJobStatus) { serverJobStatus.Add(address); } if (reply != null && reply.Status == IPStatus.Success) { } } catch (Exception) { } } ); Console.WriteLine($"Server Status Checking Completed"); i.SaveStartServerStatusJob(serverJobStatus); } catch (Exception e) { Console.WriteLine("\nUriFormatException is thrown.Message is {0}", e.Message); Console.WriteLine("\nThe format of the myProxy address you entered is invalid"); Console.WriteLine("\nPress any key to continue........."); Console.Read(); } }