public EndpointController(IEndpointRepository repository, Func<HttpRequestMessage, string> mapUsernameDelegate) { if (repository == null) throw new ArgumentNullException("repository"); this.Repository = repository; this.mapUsernameDelegate = mapUsernameDelegate; }
public ConfigurationService( ISiteRepository siteRepository, IOptionRepository optionRepository, IEndpointRepository endpointRepository, ISiteHealthUnitOfWork uow) { _siteRepository = siteRepository; _optionRepository = optionRepository; _endpointRepository = endpointRepository; _uow = uow; _simpleMapper = CreateSimpleMapper(); _deepMapper = CreateMapperWithChilds(); }
public EndpointController(IEndpointRepository EndpointRepository, IInatorRepository InatorRepository, IUserCurrentService UserCurrentService) { if (EndpointRepository == null) { throw new ArgumentNullException(nameof(EndpointRepository)); } if (InatorRepository == null) { throw new ArgumentNullException(nameof(InatorRepository)); } if (UserCurrentService == null) { throw new ArgumentNullException(nameof(UserCurrentService)); } this.endpointRepository = EndpointRepository; this.inatorRepository = InatorRepository; this.userCurrentService = UserCurrentService; }
public HandleApiController(IEndpointRepository EndpointRepository, ICsharpCompileHelper CsharpCompileHelper, IJavaScriptCompileHelper JavaScriptCompileHelper, IHostingEnvironment Env) { if (EndpointRepository == null) { throw new ArgumentNullException(nameof(EndpointRepository)); } if (CsharpCompileHelper == null) { throw new ArgumentNullException(nameof(CsharpCompileHelper)); } if (JavaScriptCompileHelper == null) { throw new ArgumentNullException(nameof(JavaScriptCompileHelper)); } if (Env == null) { throw new ArgumentNullException(nameof(Env)); } this.endpointRepository = EndpointRepository; this.csharpCompileHelper = CsharpCompileHelper; this.javaScriptCompileHelper = JavaScriptCompileHelper; this.env = Env; }
public IndexViewModel Create(string orderBy, string direction, int skip, int take, string filter) { IEndpointRepository endpointRepository = this.RequestHandler.Storage.GetRepository <IEndpointRepository>(); return(new IndexViewModel() { Grid = new GridViewModelFactory(this.RequestHandler).Create( orderBy, direction, skip, take, endpointRepository.Count(filter), new[] { new GridColumnViewModelFactory(this.RequestHandler).Create("Name", "Name"), new GridColumnViewModelFactory(this.RequestHandler).Create("URL template", "UrlTemplate"), new GridColumnViewModelFactory(this.RequestHandler).Create("Position", "Position"), new GridColumnViewModelFactory(this.RequestHandler).Create("Data sources"), new GridColumnViewModelFactory(this.RequestHandler).CreateEmpty() }, endpointRepository.Range(orderBy, direction, skip, take, filter).ToList().Select(m => new EndpointViewModelFactory(this.RequestHandler).Create(m)), "_Endpoint" ) }); }
public PushNotificationsController(IEndpointRepository endpointRepository, CloudBlobClient cloudBlobClient, string tileImagesContainerName) { if (cloudBlobClient == null) { throw new ArgumentNullException("cloudBlobClient", "The Cloud Blob Client cannot be null"); } if (endpointRepository == null) { throw new ArgumentNullException("endpointRepository", "The Endpoints repository cannot be null"); } if (string.IsNullOrWhiteSpace(tileImagesContainerName)) { throw new ArgumentException("The container name for the tile images cannot be null, empty or white space", "tileImagesContainerName"); } this.cloudBlobClient = cloudBlobClient; this.endpointRepository = endpointRepository; this.tileImagesContainerName = tileImagesContainerName; }
public WnsEndpointRepository() { this.endpointRepository = NotificationServiceContext.Current.Configuration.StorageProvider; }
public EndpointController(IEndpointRepository repository) : this(repository, NotificationServiceContext.Current.Configuration.MapUsername) { }
public IEnumerable <Endpoint> Get([FromServices] IEndpointRepository repository) { return(repository.GetAll()); }
public RegisterEndpointHanlderTests() { _endpointRepository = new EndpointFakeRepository(); _endpointHandler = new EndpointHandler(_endpointRepository); _registerEndpointCommand = new RegisterEndpointCommand("2", 1, 1, "v 0.0.1", EEndpointState.Connected); }
public EndpointHandler(IEndpointRepository repository) { _repository = repository; }
// 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, IEndpointRepository repository) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); var timerPeriod = Int32.Parse(Configuration.GetSection("AppSettings").GetSection("TimerPeriod").Value); _timer = new Timer(new TimerCallback(s => { var heartbeats = repository.GetAll(); var httpClient = new HttpClient(); foreach (var heartbeat in heartbeats) { try { httpClient.GetAsync(heartbeat.Url); } catch (Exception) { } } }), null, 1000, timerPeriod); }
protected EndpointDeliveryService(IEndpointRepository <TEndpoint> endpointRepository) { _endpointRepository = endpointRepository; }
public EndpointService( IEndpointRepository endpointRepository) { _endpointRepository = endpointRepository; }
public InatorConstraint(IEndpointRepository EndpointRepository, IHostingEnvironment Env) { if (EndpointRepository == null) { throw new ArgumentNullException(nameof(EndpointRepository)); } if (Env == null) { throw new ArgumentNullException(nameof(Env)); } this.endpointRepository = EndpointRepository; this.env = Env; }
public Endpoint GetBySeriaNumber(string serialNumber, [FromServices] IEndpointRepository repository) { return(repository.GetBySerialNumber(serialNumber)); }
public DeleteEndpointHanlderTests() { _endpointRepository = new EndpointFakeRepository(); _endpointHandler = new EndpointHandler(_endpointRepository); _deleteEndpointCommand = new DeleteEndpointCommand("1"); }
public UpdateEndpointHanlderTests() { _endpointRepository = new EndpointFakeRepository(); _endpointHandler = new EndpointHandler(_endpointRepository); _updateEndpointCommand = new UpdateEndpointCommand("1", EEndpointState.Connected); }
public EndpointsController(IEndpointRepository endpointRepository) { _endpointRepository = endpointRepository; }