public RegisterModel
 (
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     ILogger <LoginModel> logger,
     IEmailSender emailSender,
     ApplicationDbContext dbContext,
     RoleManager <IdentityRole> roleManager,
     IConfiguration config,
     IEventLogService eventLogSvc,
     IReCaptchaService reCaptchaService,
     IEmailTokenRepository emailTokenRepo
 )
 {
     _userManager      = userManager;
     _signInManager    = signInManager;
     _logger           = logger;
     _emailSender      = emailSender;
     _dbContext        = dbContext;
     _roleManager      = roleManager;
     _configuration    = config;
     _eventLogService  = eventLogSvc;
     _reCaptchaService = reCaptchaService;
     _emailTokenRepo   = emailTokenRepo;
 }
Exemple #2
0
 public DeMeritController(IMemberService member, IEventLogService eventLog, ICommonDataService common, IDeMeritService deMerit)
 {
     _member   = member;
     _eventLog = eventLog;
     _common   = common;
     _deMerit  = deMerit;
 }
Exemple #3
0
 public ProductsController(ApplicationContext applicationContext, IPersistentEventTransaction persistentEventTransaction, IEventLogPublisher eventLogPublisher, IEventLogService eventLogService)
 {
     _applicationContext         = applicationContext;
     _persistentEventTransaction = persistentEventTransaction;
     _eventLogPublisher          = eventLogPublisher;
     _eventLogService            = eventLogService;
 }
Exemple #4
0
            public void SetUp()
            {
                getPageMockAction = Substitute.For <IRichTextGetPageActionExecutor>();
                eventLogService   = Substitute.For <IEventLogService>();

                richTextController = new RichTextController(getPageMockAction, eventLogService);
            }
 public AccountController(IAvatarService avatarService,
                          IEventLogService eventLogService)
 {
     // Initializes an instance of a service used to manage user avatars
     this.avatarService   = avatarService;
     this.eventLogService = eventLogService;
 }
Exemple #6
0
 public ExposureDetectionService
 (
     ILoggerService loggerService,
     IUserDataRepository userDataRepository,
     IExposureDataRepository exposureDataRepository,
     ILocalNotificationService localNotificationService,
     IExposureRiskCalculationConfigurationRepository exposureRiskCalculationConfigurationRepository,
     IExposureRiskCalculationService exposureRiskCalculationService,
     IExposureConfigurationRepository exposureConfigurationRepository,
     IEventLogService eventLogService,
     IDebugExposureDataCollectServer exposureDataCollectServer,
     IDateTimeUtility dateTimeUtility,
     IDeviceInfoUtility deviceInfoUtility
 )
 {
     _loggerService                  = loggerService;
     _userDataRepository             = userDataRepository;
     _exposureDataRepository         = exposureDataRepository;
     _localNotificationService       = localNotificationService;
     _exposureRiskCalculationService = exposureRiskCalculationService;
     _exposureRiskCalculationConfigurationRepository = exposureRiskCalculationConfigurationRepository;
     _exposureConfigurationRepository = exposureConfigurationRepository;
     _eventLogService           = eventLogService;
     _exposureDataCollectServer = exposureDataCollectServer;
     _dateTimeUtility           = dateTimeUtility;
     _deviceInfoUtility         = deviceInfoUtility;
 }
        public EventLogControllerTest()
        {
            var mappingConfig = new MapperConfiguration(mc =>
            {
                mc.AddProfile(new AutoMapperProfile());
            });

            _repository = new EventRepository(DbContext, mappingConfig.CreateMapper());
            _service    = new EventLogService(_repository);
            _controller = new EventLogController(_service);
            _context    = new EventContext();
            _testLog    = _service.Salvar(new EventLog()
            {
                EventID     = 0,
                Level       = "ERROR",
                Title       = "development.StaticOperation.Service: <failed>",
                CollectedBy = "yvqnygr3i1xl47wanrg2",
                Log         = "IOException",
                Description = "It is thrown when an input-output operation failed or interrupted",
                Origin      = "app.server.com.br",
                Environment = "Development",
                CreatedDate = new DateTime(2008, 5, 1, 8, 30, 52)
            }
                                          );
        }
 public EventLogsController(
     IEventLogService eventLogService
     , mydbContext context)
 {
     _eventLogService = eventLogService;
     _context         = context;
 }
Exemple #9
0
 public EquipoService(IEventLogService eventLogService, IEquipoRepository equipoRepository, ITipoEquipoRepository tipoEquipoRepository, IStatusService statusService)
 {
     _eventLogService      = eventLogService;
     _equipoRepository     = equipoRepository;
     _tipoEquipoRepository = tipoEquipoRepository;
     _statusService        = statusService;
 }
Exemple #10
0
 public DebugPageViewModel(
     INavigationService navigationService,
     ITermsUpdateService termsUpdateService,
     IExposureConfigurationRepository exposureConfigurationRepository,
     IUserDataRepository userDataRepository,
     IExposureDataRepository exposureDataRepository,
     AbsExposureNotificationApiService exposureNotificationApiService,
     AbsExposureDetectionBackgroundService exposureDetectionBackgroundService,
     ICloseApplicationService closeApplicationService,
     IServerConfigurationRepository serverConfigurationRepository,
     ILocalNotificationService localNotificationService,
     ISendEventLogStateRepository sendEventLogStateRepository,
     IEventLogRepository eventLogRepository,
     IEventLogService eventLogService
     ) : base(navigationService)
 {
     Title = "Title:Debug";
     _termsUpdateService = termsUpdateService;
     _exposureConfigurationRepository = exposureConfigurationRepository;
     _userDataRepository                 = userDataRepository;
     _exposureDataRepository             = exposureDataRepository;
     _exposureNotificationApiService     = exposureNotificationApiService;
     _exposureDetectionBackgroundService = exposureDetectionBackgroundService;
     _closeApplicationService            = closeApplicationService;
     _serverConfigurationRepository      = serverConfigurationRepository;
     _localNotificationService           = localNotificationService;
     _sendEventLogStateRepository        = sendEventLogStateRepository;
     _eventLogRepository                 = eventLogRepository;
     _eventLogService = eventLogService;
 }
Exemple #11
0
 public ComplainController(IEventLogService eventLog, IComplainService complain, ICommonDataService commonData, IMemberService member)
 {
     _complain = complain;
     _eventLog = eventLog;
     _commonData = commonData;
     _member = member;
 }
            public void SetUp()
            {
                getLinkMetadataActionMock = Substitute.For <IRichTextGetLinkMetadataActionExecutor>();
                eventLogService           = Substitute.For <IEventLogService>();

                richTextController = new KenticoRichTextWidgetController(getLinkMetadataActionMock, eventLogService);
            }
 public RegisterController(ApplicationUserManager <ApplicationUser> userManager,
                           SignInManager <ApplicationUser> signInManager,
                           IEventLogService eventLogService)
 {
     this.signInManager   = signInManager;
     this.userManager     = userManager;
     this.eventLogService = eventLogService;
 }
Exemple #14
0
 public NoticeController(IMemberNoticeService memberNotice, INoticeService notice, IEventLogService eventLog, ICommonDataService common, IMemberService member)
 {
     _notice       = notice;
     _eventLog     = eventLog;
     _common       = common;
     _memberNotice = memberNotice;
     _member       = member;
 }
Exemple #15
0
 public KenticoRoleRepository(IKenticoRoleRepositoryHelper Helper,
                              IUserRoleInfoProvider userRoleInfoProvider,
                              IEventLogService eventLogService)
 {
     _Helper = Helper;
     _userRoleInfoProvider = userRoleInfoProvider;
     _eventLogService      = eventLogService;
 }
Exemple #16
0
 public EventLogPublisher(IEventLogService eventLogService, IEventPublisher eventPublisher,
                          ILogger <EventLogPublisher> logger, IEventLogUnitOfWork eventLogUnitOfWork)
 {
     _eventLogService    = eventLogService;
     _eventPublisher     = eventPublisher;
     _logger             = logger;
     _eventLogUnitOfWork = eventLogUnitOfWork;
 }
Exemple #17
0
 public AccountController(SignInManager <ApplicationUser> signInManager,
                          IMembershipActivityLogger membershipActivitiesLogger,
                          IEventLogService eventLogService)
 {
     this.signInManager = signInManager;
     this.membershipActivitiesLogger = membershipActivitiesLogger;
     this.eventLogService            = eventLogService;
 }
Exemple #18
0
 public DashBoardController(IEventLogService eventLog, ICommonDataService common, IMemberService member, IDeMeritService demerit, IComplainService complain)
 {
     _eventLog = eventLog;
     _common   = common;
     _member   = member;
     _demerit  = demerit;
     _complain = complain;
 }
 public SupplierFundController(ISupplierFundService supplierFund, IEventLogService eventLogService, IFundService fund, ISupplierService supplier, IFundModeService fundMode)
 {
     _supplierFund    = supplierFund;
     _eventLogService = eventLogService;
     _fund            = fund;
     _supplier        = supplier;
     _fundMode        = fundMode;
 }
 public ShowRecoveryCodesModel
 (
     UserManager <ApplicationUser> userManager,
     IEventLogService eventLogSvc
 )
 {
     _userManager     = userManager;
     _eventLogService = eventLogSvc;
 }
Exemple #21
0
 public StatusService(
     IStatusRepository statusRepository,
     IEventLogService eventLogService,
     ISettingService settingService)
 {
     _statusRepository = statusRepository;
     _eventLogService  = eventLogService;
     _settingService   = settingService;
 }
Exemple #22
0
 public ReportController(IEventLogService eventLog, ICommonDataService common, IReportService report, IComplainService complain, IExelReportService exel, IMemberService member)
 {
     _eventLog = eventLog;
     _common   = common;
     _report   = report;
     _complain = complain;
     _exel     = exel;
     _member   = member;
 }
Exemple #23
0
 public AccountController(
     IEventLogService eventLogService,
     IUserAccountService userAccountService,
     IProjectService projectService)
 {
     _eventLogService    = eventLogService;
     _userAccountService = userAccountService;
     _projectService     = projectService;
 }
 public AdminController(IAccessManager accessManager, IUserDataService userDataService,
                        IEventLogService eventLogService, IHostEnvironment hostEnvironment)
 {
     _accessManager      = accessManager;
     _userDataService    = userDataService;
     _eventLogService    = eventLogService;
     _hostEnvironment    = hostEnvironment;
     _adminSubsystemName = Constants.AdminSubsystem;
 }
Exemple #25
0
 public SettingsController(
     ISettingService settingService,
     IEventLogService eventLogService,
     IEmailService emailService)
 {
     _settingService  = settingService;
     _eventLogService = eventLogService;
     _emailService    = emailService;
 }
Exemple #26
0
 public HomeController(
     IEmployeesLogService employeesLogService,
     IEventLogService eventLogService,
     IEmployeesService employeesService)
 {
     _employeesLogService = employeesLogService;
     _eventLogService     = eventLogService;
     _employeesService    = employeesService;
 }
Exemple #27
0
 public RespuestaService(
     IRespuestaRepository respuestaRepository,
     IEventLogService eventLogService,
     IRespuestaComentarioRepository comentarioRepository)
 {
     _respuestaRepository  = respuestaRepository;
     _eventLogService      = eventLogService;
     _comentarioRepository = comentarioRepository;
 }
 public ConfirmEmailModel
 (
     UserManager <ApplicationUser> userManager,
     IEventLogService eventLogSvc
 )
 {
     _userManager     = userManager;
     _eventLogService = eventLogSvc;
 }
Exemple #29
0
        public StagingConfigurationHelper(ISettingsRepository settingRepository, IEventLogService eventLogService)
        {
            var settingsRepository = settingRepository;

            _eventLogService        = eventLogService;
            _excludedTypes          = settingsRepository.GetExcludedTypes();
            _excludedChildTypes     = settingsRepository.GetExcludedChildTypes();
            _excludedMediaLibraries = settingsRepository.GetExcludedMediaLibraries();
        }
        public async Task <IActionResult> RegisterWithEmailConfirmation([FromServices] IEventLogService eventLogService, RegisterViewModel model)
        {
            // Validates the received user data based on the view model
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            // Prepares a new user entity using the posted registration data
            // The user is not enabled by default
            ApplicationUser user = new ApplicationUser
            {
                UserName  = model.UserName,
                Email     = model.Email,
                FirstName = model.FirstName,
                LastName  = model.LastName
            };

            // Attempts to create the user in the Xperience database
            IdentityResult registerResult = IdentityResult.Failed();

            try
            {
                registerResult = await userManager.CreateAsync(user, model.Password);
            }
            catch (Exception ex)
            {
                // Logs an error into the Xperience event log if the creation of the user fails
                eventLogService.LogException("MvcApplication", "UserRegistration", ex);
                ModelState.AddModelError(String.Empty, "Registration failed");
            }

            // If the registration was not successful, displays the registration form with an error message
            if (!registerResult.Succeeded)
            {
                foreach (IdentityError error in registerResult.Errors)
                {
                    ModelState.AddModelError(String.Empty, error.Description);
                }
                return(View(model));
            }

            // Generates a confirmation token for the new user
            string token = await userManager.GenerateEmailConfirmationTokenAsync(user);

            // Prepares the URL of the confirmation link for the user (targets the "ConfirmUser" action)
            // Fill in the name of your controller
            string confirmationUrl = Url.Action(nameof(ConfirmUser), "EmailRegister", new { userId = user.Id, token = token }, protocol: Request.Scheme);

            // Creates and sends the confirmation email to the user's address
            await messageService.SendEmailAsync(user.Email, "Confirm your new account",
                                                String.Format("Please confirm your new account by clicking <a href=\"{0}\">here</a>", confirmationUrl));

            // Displays a view asking the visitor to check their email and confirm the new account
            return(RedirectToAction(nameof(CheckYourEmail)));
        }
Exemple #31
0
 public HomeController(
     IEmployeesLogService employeesLogService,
     IEventLogService eventLogService, 
     IEmployeesService employeesService)
 {
     
     _employeesLogService = employeesLogService;
     _eventLogService = eventLogService;
     _employeesService = employeesService;
 }
Exemple #32
0
 public LoggingEntityApp(string schema = "log", UserSessionSettings sessionSettings = null)
     : base("LoggingApp", CurrentVersion)
 {
     var area = base.AddArea(schema);
       var errorLog = new ErrorLogModule(area);
       OperationLog = new OperationLogModule(area);
       IncidentLog = new IncidentLogModule(area);
       TransactionLog = _transactionLogModule = new TransactionLogModule(area);
       WebCallLog = new WebCallLogModule(area);
       NotificationLog = new NotificationLogModule(area);
       LoginLog = new LoginLogModule(area);
       DbModelChangeLog = new DbUpgradeLogModule(area);
       SessionService = new UserSessionModule(area, sessionSettings);
       DbInfoService = new DbInfoModule(area);
       EventLogService = new EventLogModule(area);
 }