/// <summary> /// Initializes a new instance of the <see cref="T:com.kiranpatel.crimecluster.framework.ModelEvaluation"/> class. /// </summary> /// <param name="mixedMarkovModel">Mixed markov model.</param> /// <param name="incidentService">Incident Service.</param> /// <param name="logger">Logger.</param> public ModelEvaluation(IMixedMarkovModel mixedMarkovModel, IIncidentService incidentService, IDistanceMeasure distanceMeasure, ILogger logger) { this.mixedMarkovModel = mixedMarkovModel; this.incidentService = incidentService; this.distanceMeasure = distanceMeasure; this.logger = logger; }
public IncidentController(IIncidentService modelService, IDepartmentService departmentService, ICategoryService categoryService, IPriorityService priorityService) { _priorityService = priorityService; _categoryService = categoryService; _departmentService = departmentService; _modelService = modelService; }
public IncidentsSearchDetailVm(IIncidentService svc) { Title = "Search Incidents"; service = svc; Incidents = new ObservableCollection<Incident>(service.RetrieveIncidents ()); }
/// <summary> /// Initializes a new instance of the /// <see cref="T:com.kiranpatel.crimecluster.webservice.Controllers.ClusterController"/> class. /// </summary> /// <param name="repository">Repository.</param> /// <param name="configService">Config service.</param> /// <param name="logger">Logger.</param> /// <param name="serialisationService">Serialisation service.</param> /// <param name="incidentService">Incident service.</param> public ClusterController( IRepository repository, IConfigurationService configService, ILogger logger, ISerialisationService serialisationService, IIncidentService incidentService, IClusteringService clusteringService) : base(repository, configService, logger, serialisationService) { this.incidentService = incidentService; this.clusteringService = clusteringService; var googleMapsKey = this.configService.Get(ConfigurationKey.GoogleMapsKey, string.Empty); if (String.IsNullOrEmpty(googleMapsKey)) { throw new InvalidOperationException(nameof(googleMapsKey)); } this.logger.debug("Google Maps Key Loaded"); ViewBag.GoogleMapsKey = googleMapsKey; int counter = 0; this.crimeTypes = new Dictionary <int, CrimeType>(); foreach (CrimeType currentType in Enum.GetValues(typeof(CrimeType))) { crimeTypes.Add(counter, currentType); counter++; } }
public SearchNavigationPage() { InitializeComponent (); service = new InMemoryIncidentService (Constants.Incidents); // wire up incidents SearchBar incidentsSb.TextChanged += (sender, e) => { if (!string.IsNullOrEmpty (incidentsSb.Text)) incidentsLv.ItemsSource = SearchIncidents (incidentsSb.Text); else incidentsLv.ItemsSource = service.RetrieveIncidents (); }; incidentsSb.SearchButtonPressed += (sender, e) => { if (!string.IsNullOrEmpty (incidentsSb.Text)) incidentsLv.ItemsSource = SearchIncidents (incidentsSb.Text); else incidentsLv.ItemsSource = service.RetrieveIncidents (); }; // wire up incidents ListView incidentsLv.ItemsSource = service.RetrieveIncidents (); incidentsLv.ItemSelected += async (sender, e) => { if (e.SelectedItem != null) await Navigation.PushAsync (new IncidentsPage (e.SelectedItem as Incident)); incidentsLv.SelectedItem = null; }; }
public IncidentMainPageModel(ILocationService locationService, IIncidentService incidentService, INavigationService navigationService, ICameraService cameraService) { Report = null; _locationService = locationService; _incidentService = incidentService; _navigationService = navigationService; _cameraService = cameraService; TypeOfRainItems = EnumHelper <TypeOfRain> .GetDisplayItems(); FloodDepthItems = EnumHelper <FloodDepth> .GetDisplayItems(); FloodExtentItems = EnumHelper <FloodExtent> .GetDisplayItems(); FrequencyOfFloodItems = EnumHelper <FrequencyOfFlood> .GetDisplayItems(); TypeOfFloodingItems = EnumHelper <TypeOfFlood> .GetDisplayItems(); TypesOfSpaceFloodedItems = EnumHelper <TypesOfSpaceFlooded> .GetDisplayItems(); WaterClarityItems = EnumHelper <WaterClarity> .GetDisplayItems(); TypeOfFloodings = new List <int>(); FloodDepth = -1; FloodExtent = -1; FrequencyOfFlood = -1; TypesOfSpaceFlooded = -1; WaterClarity = -1; TypeOfRain = -1; TypeOfFlooding = -1; LocalImages = new ObservableCollection <LocalImage>(); }
public IncidentsController(IUserService userService, IAcademicYearService academicYearService, IRolePermissionsCache rolePermissionsCache, IStudentService studentService, IIncidentService incidentService) : base(userService, academicYearService, rolePermissionsCache, studentService) { _incidentService = incidentService; }
public IncidentsEditDetailVM(Incident incident, IIncidentService svc) { Title = "Incident Information"; service = svc; IsVisible = incident != null; Model = incident?? new Incident(); }
public IncidentsController(IIncidentService incidentService, IMapper mapper, IConverter converter, IPdfService pdfService) { _incidentService = incidentService; _mapper = mapper; _converter = converter; _pdfService = pdfService; }
public IncidentEditorViewModel(IIncidentService incidentService, INavigationService navigationService, IPageDialogService pageDialogService) { _incidentService = incidentService; _navigationService = navigationService; _pageDialogService = pageDialogService; IncidentTypes = new List <string>() { "Burn", "Fall", "Slip", "Stress" }; }
public IncidentCurrentPageModel(ILocationService locationService, IIncidentService incidentService, INavigationService navigationService, IApplicationContext applicationContext, INavigationHelper navigationHelper, IIncidentsAppService incidentsAppService, IAccessTokenManager accessTokenManager) { _locationService = locationService; _incidentService = incidentService; _navigationService = navigationService; _applicationContext = applicationContext; _navigationHelper = navigationHelper; _incidentsAppService = incidentsAppService; _accessTokenManager = accessTokenManager; }
public MainPageViewModel(IIncidentService incidentService, IDeviceService deviceService, IPageDialogService pageDialogService, INavigationService navigationService) { AppTitle = "Incident Manager"; _deviceService = deviceService; _incidentService = incidentService; _pageDialogService = pageDialogService; _navigationService = navigationService; IsItemSelected = false; Incidents = new ObservableCollection <Incident>(); }
/// <summary> /// Initializes a new instance of the /// <see cref="T:com.kiranpatel.crimecluster.webservice.Controllers.IncidentController"/> class. /// </summary> /// <param name="repository">Repository.</param> /// <param name="configService">Config service.</param> /// <param name="logger">Logger.</param> /// <param name="serialisationService">Serialisation service.</param> /// <param name="incidentService">Incident service.</param> /// <param name="incidentBacklogService">Incident backlog service.</param> /// <param name="mapper">Data Transfer Mapper</param> public IncidentController( IRepository repository, IConfigurationService configService, ILogger logger, ISerialisationService serialisationService, IIncidentService incidentService, IIncidentBacklogService incidentBacklogService, IDataTransferService <Incident, IncidentDTO> mapper) : base(repository, configService, logger, serialisationService) { this.incidentService = incidentService; this.incidentBacklogService = incidentBacklogService; this.mapper = mapper; }
/// <summary> /// Initializes a new instance of the <see cref="T:com.kiranpatel.crimecluster.framework.MixedMarkovModel"/> class. /// </summary> /// <param name="clusteringService">Clustering service.</param> /// <param name="incidentService">Incident service.</param> /// <param name="logger">Logger service.</param> /// <param name="start">Start date of the incidents in the MMM.</param> /// <param name="end">End date of the incidents in the MMM.</param> public MixedMarkovModel( IClusteringService clusteringService, IIncidentService incidentService, ILogger logger, DateTime start, DateTime end) { this.modelLookup = new Dictionary <CrimeType, MarkovModel>(); this.incidentCache = new Dictionary <CrimeType, HashSet <Incident> >(); this.clusteringService = clusteringService; this.incidentService = incidentService; this.logger = logger; this.start = start; this.end = end; }
/// <summary> /// Initializes a new instance of the /// <see cref="T:com.kiranpatel.crimecluster.webservice.Controllers.OfficerController"/> class. /// </summary> /// <param name="repository">Repository.</param> /// <param name="configService">Config service.</param> /// <param name="logger">Logger.</param> /// <param name="serialisationService">Serialisation service.</param> /// <param name="officerService">Officer service.</param> /// <param name="locationService">Location service.</param> /// <param name="incidentService"Incident service.</param> /// <param name="mapper">mapper.</param> public OfficerController( IRepository repository, IConfigurationService configService, ILogger logger, ISerialisationService serialisationService, IOfficerService officerService, ILocationService locationService, IIncidentService incidentService, IIncidentOutcomeService incidentOutcomeService, IDataTransferService <Officer, OfficerDTO> mapper) : base(repository, configService, logger, serialisationService) { this.officerService = officerService; this.locationService = locationService; this.incidentService = incidentService; this.outcomeService = incidentOutcomeService; this.mapper = mapper; }
private void CheckingRepositoriesAndServices() { _incidentXrmRepository = _repositoryNinjectFactory.IncidentXrmRepository(); if (_incidentXrmRepository == null) { throw new NullReferenceException("IncidentXrmRepository is null"); } _sqlService = _internalServiceFactory.SqlService(); if (_sqlService == null) { throw new NullReferenceException("SqlService is null"); } _incidentService = _internalServiceFactory.IncidentService(); if (_incidentService == null) { throw new NullReferenceException("IncidentService is null"); } _systemUserService = _internalServiceFactory.SystemUserService(); if (_systemUserService == null) { throw new NullReferenceException("SystemUserService is null"); } _phoneCallService = _internalServiceFactory.PhoneCallService(); if (_phoneCallService == null) { throw new NullReferenceException("PhoneCallService is null"); } _emailService = _internalServiceFactory.EmailService(); if (_emailService == null) { throw new NullReferenceException("EmailService is null"); } _annotationService = _internalServiceFactory.AnnotationService(); if (_annotationService == null) { throw new NullReferenceException("AnnotationService is null"); } }
public async Task <IActionResult> CreateAsync([FromBody] IncidentDto input, [FromServices] IIncidentService incidentService) { // Map. var incident = _mapper.Map <Incident>(input); // FUTURE: Remove the meta object. // Act. incident = await incidentService.AddAsync(incident, new { SessionUser = _appContext.UserId, SessionOrganization = _appContext.TenantId, }); // Map. var output = _mapper.Map <IncidentDto>(incident); // Return. return(Ok(output)); }
public SearchPage() { Title = "Incidents"; this.Padding = new Thickness (0, Device.OnPlatform (20, 0, 0), 0, 0); label = new Label { Text = "Incidents", HorizontalOptions = LayoutOptions.CenterAndExpand }; service = new InMemoryIncidentService (Constants.Incidents); listview = new ListView (); listview.ItemsSource = service.RetrieveIncidents (); searchbar = new SearchBar () { Placeholder = "Search", }; searchbar.TextChanged += (sender, e) => { if (!string.IsNullOrEmpty (searchbar.Text)) listview.ItemsSource = SearchIncidents (searchbar.Text); else listview.ItemsSource = service.RetrieveIncidents (); }; searchbar.SearchButtonPressed += (sender, e) => { if (!string.IsNullOrEmpty (searchbar.Text)) listview.ItemsSource = SearchIncidents (searchbar.Text); else listview.ItemsSource = service.RetrieveIncidents (); }; var stack = new StackLayout () { Orientation = StackOrientation.Vertical, Children = { label, searchbar, listview } }; Content = stack; }
public SearchPageCustomTemplate() { InitializeComponent (); service = new InMemoryIncidentService (Constants.Incidents); incidentsLV.ItemsSource = service.RetrieveIncidents (); searchBar.TextChanged += (sender, e) => { if (!string.IsNullOrEmpty (searchBar.Text)) incidentsLV.ItemsSource = SearchIncidents (searchBar.Text); else incidentsLV.ItemsSource = service.RetrieveIncidents (); }; searchBar.SearchButtonPressed += (sender, e) => { if (!string.IsNullOrEmpty (searchBar.Text)) incidentsLV.ItemsSource = SearchIncidents (searchBar.Text); else incidentsLV.ItemsSource = service.RetrieveIncidents (); }; }
public IncidentUploadPageModel(IIncidentService incidentService, INavigationService navigationService, INavigationHelper navigationHelper, IAccessTokenManager accessTokenManager, IIncidentsAppService incidentsAppService) { _incidentService = incidentService; _navigationService = navigationService; _accessTokenManager = accessTokenManager; _incidentsAppService = incidentsAppService; Items = new ObservableRangeCollection <LocalIncident>(); AllItems = new ObservableRangeCollection <LocalIncident>(); FilterOptions = new ObservableRangeCollection <DisplayItem> { new DisplayItem { Text = "ShowAll".Translate(), Value = string.Empty }, new DisplayItem { Text = "Showlastday".Translate(), Value = DateTime.Today.AddDays(-1).ToString(CultureInfo.InvariantCulture) }, new DisplayItem { Text = "Showlastweek".Translate(), Value = DateTime.Today.AddDays(-7).ToString(CultureInfo.InvariantCulture) } }; SelectedFilter = new DisplayItem { Text = "ShowAll", Value = string.Empty }; _navigationHelper = navigationHelper; }
public CommandAppController( IUsersService usersService, IDepartmentsService departmentsService, IUserProfileService userProfileService, IUnitsService unitsService, ICallsService callsService, IDepartmentGroupsService departmentGroupsService, IPersonnelRolesService personnelRolesService, ICustomStateService customStateService, IGeoLocationProvider geoLocationProvider, IIncidentService incidentService ) { _usersService = usersService; _departmentsService = departmentsService; _userProfileService = userProfileService; _unitsService = unitsService; _callsService = callsService; _departmentGroupsService = departmentGroupsService; _personnelRolesService = personnelRolesService; _customStateService = customStateService; _geoLocationProvider = geoLocationProvider; _incidentService = incidentService; }
public IncidentsController(IIncidentService incidentService, IEventService eventService) { _incidentService = incidentService; _eventService = eventService; }
public PlayersController(IPlayerService playerService, IIncidentService incidentService) { _playerService = playerService; _incidentService = incidentService; }
public IncidentController(IMapper mapper, IIncidentService incidentService) { _mapper = mapper; _incidentService = incidentService; }
public IncidentController(ILogger logger, IIncidentService incidentService) : base(logger) { _incidentService = incidentService; }
public PdfService(IIncidentService incidentService) { _incidentService = incidentService; }
public IncidentController(IIncidentService incidentService) { this.incidentService = incidentService; }
public IncidentController(IIncidentService incidentService) { _incidentService = incidentService; }
public async Task <IActionResult> CreateIncidentAsync([FromBody] IncidentDto input, [FromServices] IIncidentService incidentService) { // Map. var incident = _mapper.Map <Incident>(input); // Act. await incidentService.AddAsync(incident); // Return. return(NoContent()); }
public ProfileController(IIncidentService incidentService) { _incidentService = incidentService; }
public SquadService(UnderseaDbContext dbContext, ILaboratoryService laboratoryService, IIncidentService incidentService) { _dbContext = dbContext; _laboratoryService = laboratoryService; _incidentService = incidentService; }
public IncidentController(IOptions <AppSettings> appsettings, IIncidentService incidentService) { this.iIncidentService = incidentService; this._appSettings = appsettings.Value; }