public UserProfileService( ILogger logger, IProfileDataService profileDataService, IPasswordService passwordService) { _logger = logger; _profileDataService = profileDataService; _passwordService = passwordService; }
public AppointmentViewModel( IMedicalSpecializationDataService medicalSpecializationDataService, IBuildingDataService buildingDataService, IProfileDataService profileDataService, ISuggestionProvider geoSuggestionProvider, IEventAggregator eventAggregator) { this.MedicalSpecializationDataService = medicalSpecializationDataService; this.GeoSuggestionProvider = geoSuggestionProvider; this.BuildingDataService = buildingDataService; this.ProfileDataService = profileDataService; this.EventAggregator = eventAggregator; this.PageContract = new PageControlContract(default(int), this.MedicalSpecializationDataService); this.PageSizes = new ObservableCollection <int> { 2, 10, 20, 50, 100, 200 }; this.LoadedCommand = AsyncCommand.Create(this.OnLoadedAsync); this.OpenSpecializationCommand = new RelayCommand( parameter => { var args = (List <int>)parameter; this.EventAggregator.GetEvent <OpenSpecializationDoctorsEvent>().Publish( new OpenSpecializationDoctorsArgs { PolyclinicId = args[1], SpecializationId = args[0], ParentViewModel = this }); }); }
public MedicalCardRecordViewModel( int recordId, object parentViewModel, IMedicalRecordDataService recordDataService, IAttachmentDataService attachmentDataService, IProfileDataService profileDataService, IEventAggregator eventAggregator) { this.RecordId = recordId; this.RecordDataService = recordDataService; this.AttachmentDataService = attachmentDataService; this.ProfileDataService = profileDataService; this.EventAggregator = eventAggregator; this.Attachments = new ObservableCollection <AttachmentInfoWrapper>(); this.LoadedCommand = AsyncCommand.Create(this.OnLoadedAsync); this.OpenAttachmentCommand = AsyncCommand.Create <int>(this.OnOpenAttachmentAsync); this.ShowAttachmentInFolderCommand = AsyncCommand.Create <int>(this.OnShowAttachmentAsync); this.BackCommand = new RelayCommand( () => this.EventAggregator.GetEvent <NavigationEvent>().Publish(parentViewModel)); this.OpenAssociatedRecordCommand = new RelayCommand(() => this.EventAggregator.GetEvent <OpenRecordEvent>().Publish(new OpenRecordEventArgs { RecordId = this.Record.AssociatedRecordId.Value, ParentViewModel = this })); this.OpenDoctorCommand = new RelayCommand(() => this.EventAggregator.GetEvent <OpenDoctorEvent>().Publish(new OpenDoctorEventArgs { DoctorId = this.Record.Author.Id, ParentViewModel = this })); }
public ModalDialog() { this._ratingDataService = (IRatingDataService)Mvx.get_IoCProvider().Resolve <IRatingDataService>(); this._textProvider = (IMvxTextProvider)Mvx.get_IoCProvider().Resolve <IMvxTextProvider>(); this._packageInfo = (IPackageInfo)Mvx.get_IoCProvider().Resolve <IPackageInfo>(); this._messenger = (IMvxMessenger)Mvx.get_IoCProvider().Resolve <IMvxMessenger>(); this._profileDataService = (IProfileDataService)Mvx.get_IoCProvider().Resolve <IProfileDataService>(); this._remoteConfigurationService = (IFirebaseRemoteConfigurationService)Mvx.get_IoCProvider().Resolve <IFirebaseRemoteConfigurationService>(); this._messenger.Subscribe <RatingChooserMessage>((Action <M0>)(async message => await this.RatingChooserMessageHandler(message.Message)), (MvxReference)1, (string)null); }
public ProfileController(IProfileDataService profileDataService, IEmployeeService employeesService, IPageListsService pageListsService, IRequestCreationService requestCreationService) { _profileDataService = profileDataService; _employeeService = employeesService; _pageListsService = pageListsService; _requestCreationService = requestCreationService; }
public override void HandleError(RefreshTokenException exception) { IProfileDataService profileDataService = (IProfileDataService)Mvx.get_IoCProvider().Resolve <IProfileDataService>(); M0 m0 = Mvx.get_IoCProvider().Resolve <IMvxMessenger>(); profileDataService.DeleteOnlyProfileData(exception.Profile); LoginRequiredMessage loginRequiredMessage = new LoginRequiredMessage((object)this, exception.Profile); ((IMvxMessenger)m0).Publish <LoginRequiredMessage>((M0)loginRequiredMessage); }
public ProfileService( IProfileDataService profileDataService, IMemberProfileRelationshipDataService memberProfileRelationshipDataService, IMemberDataService memberDataService, IMapper mapper) { _profileDataService = profileDataService; _memberProfileRelationshipDataService = memberProfileRelationshipDataService; _mapper = mapper; _memberDataService = memberDataService; }
public PushNotificationService() { this._pushNotificationHandler = (IPushNotificationHandler)Mvx.get_IoCProvider().Resolve <IPushNotificationHandler>(); this._parsedMessageDataService = (IParsedMessageDataService)Mvx.get_IoCProvider().Resolve <IParsedMessageDataService>(); this._profileDataService = (IProfileDataService)Mvx.get_IoCProvider().Resolve <IProfileDataService>(); this._evaluationDataService = (IEvaluationDataService)Mvx.get_IoCProvider().Resolve <IEvaluationDataService>(); this._absenceDataService = (IAbsenceDataService)Mvx.get_IoCProvider().Resolve <IAbsenceDataService>(); this._noteDataService = (INoteDataService)Mvx.get_IoCProvider().Resolve <INoteDataService>(); this._uzenetDataService = (IUzenetDataService)Mvx.get_IoCProvider().Resolve <IUzenetDataService>(); this._lessonDataService = (ILessonDataService)Mvx.get_IoCProvider().Resolve <ILessonDataService>(); this._examDataService = (IExamDataService)Mvx.get_IoCProvider().Resolve <IExamDataService>(); }
protected ViewModelBase() { base.\u002Ector(); this._settings = (IApplicationSettings)Mvx.get_IoCProvider().Resolve <IApplicationSettings>(); this._navigationService = (IMvxNavigationService)Mvx.get_IoCProvider().Resolve <IMvxNavigationService>(); this._textProvider = (IMvxTextProvider)Mvx.get_IoCProvider().Resolve <IMvxTextProvider>(); this._userDialogs = (IUserDialogs)Mvx.get_IoCProvider().Resolve <IUserDialogs>(); this._modalDialog = (IModalDialog)Mvx.get_IoCProvider().Resolve <IModalDialog>(); this._connectivity = (IConnectivity)Mvx.get_IoCProvider().Resolve <IConnectivity>(); this._singleNavigation = (ISingleNavigation)Mvx.get_IoCProvider().Resolve <ISingleNavigation>(); this._profileDataService = (IProfileDataService)Mvx.get_IoCProvider().Resolve <IProfileDataService>(); this._profileDbDataService = (IProfileDbDataService)Mvx.get_IoCProvider().Resolve <IProfileDbDataService>(); this._formsViewPresenter = (IMvxFormsViewPresenter)Mvx.get_IoCProvider().Resolve <IMvxFormsViewPresenter>(); }
public override void HandleError(ServerUnreachableException exception) { IAuthDataService authDataService = (IAuthDataService)Mvx.get_IoCProvider().Resolve <IAuthDataService>(); IProfileDataService profileDataService = (IProfileDataService)Mvx.get_IoCProvider().Resolve <IProfileDataService>(); M0 m0 = Mvx.get_IoCProvider().Resolve <IConnectivity>(); ICredentialsDataService credentialsDataService = (ICredentialsDataService)Mvx.get_IoCProvider().Resolve <ICredentialsDataService>(); if (((IConnectivity)m0).get_IsConnected()) { Profile profile = profileDataService.GetActiveProfile(); try { if (profile == null) { this.DisplayServerUnreachableErrorMessage(exception); } else { Credentials credentials = credentialsDataService.GetCredentials(profile?.Id); if (credentials != null) { Task.Run <Profile>((Func <Task <Profile> >)(() => authDataService.Login(profile.Institute, credentials.UserName, credentials.Password))).Wait(); } else { Task.Run <TokenData>((Func <Task <TokenData> >)(() => authDataService.RefreshToken(profile))).Wait(); } } } catch (AggregateException ex) { foreach (Exception innerException in ex.Flatten().InnerExceptions) { if (innerException is ServerUnreachableException exception1) { this.DisplayServerUnreachableErrorMessage(exception1); ErrorHandler.Current.HandleError((Exception) new RefreshTokenException("Sikertelen relogin vagy token refresh", profile).SetErrorCode <RefreshTokenException>("/Users/admin/myagent/macMiniBlack3/_work/2/s/eKreta.Mobile/eKreta.Mobile.Core.Standard/Helpers/ErrorHandlers/ServerUnreachableErrorHandler.cs", 58)); } else { ErrorHandler.Current.HandleError(innerException); } } } } else { ErrorHandler.Current.HandleError((Exception) new NoInternetConnectionException().SetErrorCode <NoInternetConnectionException>("/Users/admin/myagent/macMiniBlack3/_work/2/s/eKreta.Mobile/eKreta.Mobile.Core.Standard/Helpers/ErrorHandlers/ServerUnreachableErrorHandler.cs", 69)); } }
public RefreshDataService() { this._profileDataService = (IProfileDataService)Mvx.get_IoCProvider().Resolve <IProfileDataService>(); this._absenceDataService = (IAbsenceDataService)Mvx.get_IoCProvider().Resolve <IAbsenceDataService>(); this._evaluationDataService = (IEvaluationDataService)Mvx.get_IoCProvider().Resolve <IEvaluationDataService>(); this._noteDataService = (INoteDataService)Mvx.get_IoCProvider().Resolve <INoteDataService>(); this._lessonDataService = (ILessonDataService)Mvx.get_IoCProvider().Resolve <ILessonDataService>(); this._eventDataService = (IEventDataService)Mvx.get_IoCProvider().Resolve <IEventDataService>(); this._subjectAverageDataService = (ISubjectAverageDataService)Mvx.get_IoCProvider().Resolve <ISubjectAverageDataService>(); this._studentDataService = (IStudentDataService)Mvx.get_IoCProvider().Resolve <IStudentDataService>(); this._uzenetDataService = (IUzenetDataService)Mvx.get_IoCProvider().Resolve <IUzenetDataService>(); this._examDataService = (IExamDataService)Mvx.get_IoCProvider().Resolve <IExamDataService>(); this._mobileApi = (IMobileApi)Mvx.get_IoCProvider().Resolve <IMobileApi>(); this._globalMobileApi = (IGlobalMobileApi)Mvx.get_IoCProvider().Resolve <IGlobalMobileApi>(); this._messenger = (IMvxMessenger)Mvx.get_IoCProvider().Resolve <IMvxMessenger>(); }
public DoctorViewModel( int doctorId, object parentViewModel, IDoctorDataService doctorDataService, IProfileDataService profileDataService, IEventAggregator eventAggregator) { this.DoctorId = doctorId; this.DoctorDataService = doctorDataService; this.ProfileDataService = profileDataService; this.EventAggregator = eventAggregator; this.LoadedCommand = AsyncCommand.Create(this.OnLoadedAsync); this.BackCommand = new RelayCommand( () => this.EventAggregator.GetEvent <NavigationEvent>().Publish(parentViewModel)); }
public ProfileViewModel(IProfileDataService profileService, IDialogCoordinator dialogCoordinator, IFileDialogCoordinator fileDialogCoordinator) { this.FileDialogCoordinator = fileDialogCoordinator; this.ProfileService = profileService; this.DialogCoordinator = dialogCoordinator; this.LoadedCommand = AsyncCommand.Create( async() => { try { Profile model = await this.ProfileService.GetCurrentProfileAsync(); this.Profile = new ProfileWrapper(model); } catch (Exception e) { await this.DialogCoordinator.ShowMessageAsync(this, "Oops", e.Message); } }); this.ChangePhotoCommand = AsyncCommand.Create( async() => { try { string filename = FileDialogCoordinator.OpenFile("Select image file", "Images (*.jpg;*.png)|*.jpg;*.png"); if (string.IsNullOrEmpty(filename)) { return; } var bytes = File.ReadAllBytes(filename); this.Profile.Photo = bytes; await this.ProfileService.InsertOrUpdateProfileAsync(this.Profile.Model); } catch (Exception e) { await this.DialogCoordinator.ShowMessageAsync(this, "Oops", e.Message); } }); }
public TeamLeaderController( IProfileDataService profileDataService, IEmployeeService employeeService, IPageListsService pageListsService, IEmployeeListService employeeListService, IRequestService requestService, ITeamService teamService, IPhotoUploadService photoUploadService, IRequestCreationService requestCreationService) { _profileDataService = profileDataService; _employeeService = employeeService; _pageListsService = pageListsService; _employeeListService = employeeListService; _requestProcessService = requestService; _teamService = teamService; _photoUploadService = photoUploadService; _requestCreationService = requestCreationService; }
public JobProfileFunctionsGetJobProfileDetailTests() { const string fakeHostName = "DummyHostName"; httpRequest = A.Fake <HttpRequest>(); httpRequest.HttpContext.Request.Scheme = "http"; httpRequest.HttpContext.Request.Host = new HostString(fakeHostName); profileDataService = A.Fake <IProfileDataService>(); var httpContextAccessor = A.Fake <IHttpContextAccessor>(); var correlationProvider = new RequestHeaderCorrelationIdProvider(httpContextAccessor); using var telemetryConfig = new TelemetryConfiguration(); var telemetryClient = new TelemetryClient(telemetryConfig); var logger = new LogService(correlationProvider, telemetryClient); var correlationResponse = new ResponseWithCorrelation(correlationProvider, httpContextAccessor); functionApp = new JobProfileFunctions(logger, correlationResponse); }
public CreateProfileViewModel(ISuggestionProvider geoSuggestionProvider, IProfileDataService profileService, IBuildingDataService buildingService, IDialogCoordinator dialogCoordinator, IFileDialogCoordinator fileDialogCoordinator) { this.GeoSuggestionProvider = geoSuggestionProvider; this.ProfileService = profileService; this.BuildingService = buildingService; this.DialogCoordinator = dialogCoordinator; this.FileDialogCoordinator = fileDialogCoordinator; this.Profile = new ProfileWrapper(new Profile { DateOfBirth = DateTime.Now }); this.Address = new AddressWrapper(new Address()); this.AddPhotoCommand = new RelayCommand(this.OpenPhotoAsBytes); this.ValidateCommand = AsyncCommand.Create(this.ValidateAsync); this.CreateProfileCommand = AsyncCommand.Create(this.CreateAndSaveProfileAsync); }
public async Task <IActionResult> GetJobProfileDetail( [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "{canonicalName}")] HttpRequest request, string canonicalName, [Inject] IProfileDataService dataService) { request.LogRequestHeaders(logService); var jobProfile = await dataService.GetJobProfile(canonicalName).ConfigureAwait(false); if (jobProfile is null) { logService.LogMessage($"Job Profile with name {canonicalName} does not exist", SeverityLevel.Warning); return(responseWithCorrelation.ResponseWithCorrelationId(HttpStatusCode.NoContent)); } jobProfile.RelatedCareers?.ForEach(r => r.Url = request.GetAbsoluteUrlForRelativePath(r.Url.TrimStart('/'))); jobProfile.Url = request.GetAbsoluteUrlForRelativePath(jobProfile.Url?.TrimStart('/')); return(responseWithCorrelation.ResponseObjectWithCorrelationId(jobProfile)); }
public SpecializationDoctorsViewModel( int polyclinicId, int specializationId, object parentViewModel, IMedicalSpecializationDataService specializationDataService, IPolyclinicDataService polyclinicDataService, IDoctorDataService doctorDataService, IProfileDataService profileDataService, IEventAggregator eventAggregator) { this.PolyclinicId = polyclinicId; this.SpecializationId = specializationId; this.SpecializationDataService = specializationDataService; this.PolyclinicDataService = polyclinicDataService; this.DoctorDataService = doctorDataService; this.ProfileDataService = profileDataService; this.EventAggregator = eventAggregator; this.PageContract = new PageControlContract( this.PolyclinicId, this.SpecializationId, this.DoctorDataService, this.ProfileDataService); this.PageSizes = new ObservableCollection <int> { 2, 10, 20, 50, 100, 200 }; this.LoadedCommand = AsyncCommand.Create(this.OnLoadedAsync); this.OpenDoctorCommand = new RelayCommand <int>( doctorId => this.EventAggregator.GetEvent <OpenDoctorTimetableEvent>().Publish( new OpenDoctorTimetableEventArgs { DoctorId = doctorId, ParentViewModel = this })); this.BackCommand = new RelayCommand( () => this.EventAggregator.GetEvent <NavigationEvent>().Publish(parentViewModel)); }
public AdminController( IProfileDataService profileDataService, IEmployeeService employeeService, IPageListsService pageListsService, IEmployeeListService adminEmployeeListService, IRequestService requestService, ITeamService teamService, IPhotoUploadService photoUploadService, IValidateService validateService, IRequestCreationService requestCreationService) { _profileDataService = profileDataService; _employeeService = employeeService; _pageListsService = pageListsService; _employeeListService = adminEmployeeListService; _requestProcessService = requestService; _teamService = teamService; _photoUploadService = photoUploadService; _validateService = validateService; _requestCreationService = requestCreationService; }
public AuthDataService() { this._mobileApi = (IMobileApi)Mvx.get_IoCProvider().Resolve <IMobileApi>(); this._tokenValidator = (ITokenValidator)Mvx.get_IoCProvider().Resolve <ITokenValidator>(); this._messenger = (IMvxMessenger)Mvx.get_IoCProvider().Resolve <IMvxMessenger>(); this._secureStore = (ISecureStore)Mvx.get_IoCProvider().Resolve <ISecureStore>(); this._profileDataService = (IProfileDataService)Mvx.get_IoCProvider().Resolve <IProfileDataService>(); this._absenceDataService = (IAbsenceDataService)Mvx.get_IoCProvider().Resolve <IAbsenceDataService>(); this._evaluationDataService = (IEvaluationDataService)Mvx.get_IoCProvider().Resolve <IEvaluationDataService>(); this._noteDataService = (INoteDataService)Mvx.get_IoCProvider().Resolve <INoteDataService>(); this._lessonDataService = (ILessonDataService)Mvx.get_IoCProvider().Resolve <ILessonDataService>(); this._subjectAverageDataService = (ISubjectAverageDataService)Mvx.get_IoCProvider().Resolve <ISubjectAverageDataService>(); this._studentDataService = (IStudentDataService)Mvx.get_IoCProvider().Resolve <IStudentDataService>(); this._eventDataService = (IEventDataService)Mvx.get_IoCProvider().Resolve <IEventDataService>(); this._teacherHomeWorkDataService = (ITeacherHomeWorkDataService)Mvx.get_IoCProvider().Resolve <ITeacherHomeWorkDataService>(); this._studentHomeWorkDataService = (IStudentHomeWorkDataService)Mvx.get_IoCProvider().Resolve <IStudentHomeWorkDataService>(); this._cacheDataService = (ICacheDataService)Mvx.get_IoCProvider().Resolve <ICacheDataService>(); this._uzenetDataService = (IUzenetDataService)Mvx.get_IoCProvider().Resolve <IUzenetDataService>(); this._examDataService = (IExamDataService)Mvx.get_IoCProvider().Resolve <IExamDataService>(); this._instituteDataService = (IInstituteDataService)Mvx.get_IoCProvider().Resolve <IInstituteDataService>(); }
private static void AddAccessTokenToHttpHeader <T>( HttpRequestMessage httpMessage, string profileId) where T : class { ISecureStore secureStore = (ISecureStore)Mvx.get_IoCProvider().Resolve <ISecureStore>(); IProfileDataService profileDataService = (IProfileDataService)Mvx.get_IoCProvider().Resolve <IProfileDataService>(); Profile profile = profileId != null?profileDataService.GetProfile(profileId) : profileDataService.GetActiveProfile(); if (profile == null) { return; } TokenData tokenData = secureStore.GetTokenData(profile.Id); if (tokenData == null) { return; } httpMessage.Headers.Add("Authorization", "bearer " + tokenData.AccessToken); }
public OfficeController(IOfficeDataService officeDataService, IProfileDataService profileDataService, ILogger <OfficeController> logger) { _officeDataService = officeDataService; _profileDataService = profileDataService; _logger = logger; }
public ProfileController(IProfileDataService profileDataService, IOfficeDataService officeDataService) { _profileDataService = profileDataService; _officeDataService = officeDataService; }
public ProfileController(IProfileDataService profileDataService) { _profileDataService = profileDataService; }
public FriendController(IFriendDataService friendDataService, IProfileDataService profileDataService) { _friendDataService = friendDataService; _profileDataService = profileDataService; }
public AuthorizationController(IAuthDataService authDataService, IProfileDataService profileDataService) { _authDataService = authDataService; _profileDataService = profileDataService; }
public ProfileController(IProfileDataService profileDataService) { _profileDataService = profileDataService; }
public DoctorTimetableViewModel(int doctorId, object parentViewModel, IAppointmentDataService appointmentDataService, IProfileDataService profileDataService, INotificationService notificationService, IEventAggregator eventAggregator, IRequestCoordinator requestCoordinator) { this.DoctorId = doctorId; this.ParentViewModel = parentViewModel; this.AppointmentDataService = appointmentDataService; this.ProfileDataService = profileDataService; this.NotificationService = notificationService; this.EventAggregator = eventAggregator; this.Appointments = new TrulyObservableCollection <CalendarItemWrapper>(); this.UserId = requestCoordinator.UserId.Value; this.LoadedCommand = AsyncCommand.Create(this.OnLoadedAsync); this.SelectedDateChangedCommand = AsyncCommand.Create <DateTime>(this.OnSelectedDateChangedAsync); this.ScheduleAppointmentCommand = AsyncCommand.Create <DateTime>(this.OnScheduleAsync); this.CancelAppointmentCommand = AsyncCommand.Create <int>(this.OnCancelAsync); this.OpenDoctorCommand = new RelayCommand( () => this.EventAggregator.GetEvent <OpenDoctorEvent>().Publish( new OpenDoctorEventArgs { DoctorId = this.DoctorId, ParentViewModel = this })); this.BackCommand = AsyncCommand.Create(async() => { await this.NotificationService.UnsubscribeAsync(this.DoctorId, this.SelectedDate); this.EventAggregator.GetEvent <NavigationEvent>().Publish(parentViewModel); }); BindingOperations.EnableCollectionSynchronization(this.Appointments, lockObject); }
public RegisterService(UserManager <IdentityUser> userManager, IProfileDataService profileDataService, IOptions <AppSettings> options) { _userManager = userManager; _profileDataService = profileDataService; _options = options; }
public async Task <IActionResult> HealthCheck([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "health/healthcheck")] HttpRequest request, [Inject] IProfileDataService dataService) { request.LogRequestHeaders(logService); logService.LogMessage($"{nameof(HealthCheck)} has been called", SeverityLevel.Information); try { var isHealthy = !(dataService is null) && await dataService.PingAsync().ConfigureAwait(false); if (isHealthy) { logService.LogMessage($"{nameof(HealthCheck)} responded with: {resourceName} - {SuccessMessage}", SeverityLevel.Information); return(responseWithCorrelation.ResponseObjectWithCorrelationId(HttpStatusCode.OK)); } logService.LogMessage($"{nameof(HealthCheck)}: Ping to {resourceName} has failed", SeverityLevel.Error); } catch (HttpRequestException ex) { logService.LogMessage($"{nameof(HealthCheck)}: {resourceName} exception: {ex.Message}", SeverityLevel.Error); } return(new StatusCodeResult((int)HttpStatusCode.ServiceUnavailable)); }
public PageControlContract(int polyclinicId, int specializationId, IDoctorDataService doctorDataService, IProfileDataService profileDataService) { this.PolyclinicId = polyclinicId; this.SpecializationId = specializationId; this.DoctorDataService = doctorDataService; this.ProfileDataService = profileDataService; }