コード例 #1
0
 public AdminService(CoreaccesscontrolContext context, AppSettings appSettings, IEmailSender emailSender, IEmailService emailService)
 {
     _context      = context;
     _appSettings  = appSettings;
     _emailSender  = emailSender;
     _emailService = emailService;
 }
 public AuthenticationCodeService(CoreaccesscontrolContext context, IEmailSender emailSender, IEmailService emailService, IApiService apiService)
 {
     _context      = context;
     _emailSender  = emailSender;
     _emailService = emailService;
     _apiService   = apiService;
 }
        public AuthenticationCodeController GetAuthenticationCodeController(CoreaccesscontrolContext context, IApiService apiService)
        {
            Logger.Init(GetAppSettings().ConnectionStrings.DefaultConnection, "CoreAccessControl.log", "CoreAccessControl", Severity.Information, mock: true);
            var authHelpers = new AuthHelpers(GetMockHttpContextAccessor().Object);
            var service     = new AuthenticationCodeService(context, new FakeEmailSender(), new FakeEmailService(), apiService);

            return(new AuthenticationCodeController(service, authHelpers));
        }
コード例 #4
0
        public KeyholderController GetKeyholderController(CoreaccesscontrolContext context, IApiService apiService)
        {
            Logger.Init("", "CoreAccessControl.log", "CoreAccessControl", Severity.Information, mock: true);
            var authHelpers = new AuthHelpers(GetMockHttpContextAccessor().Object);
            var service     = new KeyholderService(context, apiService);

            return(new KeyholderController(service, authHelpers));
        }
        public AccessHistoryController GetAccessHistoryController(CoreaccesscontrolContext context, IApiService apiService)
        {
            Logger.Init(GetAppSettings().ConnectionStrings.DefaultConnection, "CoreAccessControl.log", "CoreAccessControl", Severity.Information, mock: true);
            var authHelpers = new AuthHelpers(GetMockHttpContextAccessor().Object);
            var service     = new AccessHistoryService(apiService);

            return(new AccessHistoryController(service, authHelpers));
        }
コード例 #6
0
        public CoreaccesscontrolContext GetInMemoryContext()
        {
            var options = new DbContextOptionsBuilder <CoreaccesscontrolContext>()
                          .UseInMemoryDatabase(databaseName: this.GetType().Name)
                          .Options;

            var context = new CoreaccesscontrolContext(options);

            context.Database.EnsureDeleted();
            context.Database.EnsureCreated();

            return(context);
        }
コード例 #7
0
 public AuthService GetAuthService(CoreaccesscontrolContext context)
 {
     Logger.Init(GetAppSettings().ConnectionStrings.DefaultConnection, "CoreAccessControl.log", "CoreAccessControl", Severity.Information, mock: true);
     return(new AuthService(context, GetAppSettings(), new FakeEmailSender(), new FakeEmailService()));
 }
コード例 #8
0
 public LocationService(CoreaccesscontrolContext context)
 {
     _context = context;
 }
コード例 #9
0
 public KeyholderService(CoreaccesscontrolContext context, IApiService apiService)
 {
     _context    = context;
     _apiService = apiService;
 }
コード例 #10
0
 public AccountService(CoreaccesscontrolContext context, IEmailSender emailSender, IEmailService emailService)
 {
     _context      = context;
     _emailSender  = emailSender;
     _emailService = emailService;
 }