public SecurityAdminController(UserManager <IdentityUser> userManager,
                                       RoleManager <IdentityRole> roleManager, IPresidentService presidentService,
                                       ApplicationDbContext dbContext, ISubscriptionService subscriptionService)
        {
            if (roleManager == null)
            {
                throw new ArgumentNullException(nameof(roleManager), $"{nameof(roleManager)} is null.");
            }

            if (presidentService == null)
            {
                throw new ArgumentNullException("presidentService", "Argument cannot be null.");
            }

            if (userManager == null)
            {
                throw new ArgumentNullException(nameof(userManager), $"{nameof(userManager)} is null.");
            }

            _UserManager         = userManager;
            _PresidentService    = presidentService;
            _RoleManager         = roleManager;
            _Context             = dbContext;
            _SubscriptionService = subscriptionService;
        }
예제 #2
0
        public PresidentController(IPresidentService service)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", "service is null.");
            }

            _Service = service;
        }
예제 #3
0
        public TestDataUtility(IPresidentService service)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", "service is null.");
            }

            _Service = service;
        }
예제 #4
0
        public SearchController(IPresidentService service,
                                IFeatureManager featureManager)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", "service is null.");
            }
            if (featureManager == null)
            {
                throw new ArgumentNullException("featureManager", "featureManager is null.");
            }

            _Service        = service;
            _FeatureManager = featureManager;
        }
        public PresidentController(IPresidentService service,
                                   IValidatorStrategy <President> validator,
                                   ITestDataUtility testDataUtility
                                   )
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", "service is null.");
            }

            if (validator == null)
            {
                throw new ArgumentNullException("validator", "Argument cannot be null.");
            }

            _Validator       = validator;
            _Service         = service;
            _TestDataUtility = testDataUtility;
        }
예제 #6
0
        public TestDataUtility(IPresidentService service, PresidentsDbContext dbContext,
                               UserManager <IdentityUser> userManager,
                               RoleManager <IdentityRole> roleManager
                               )
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", "service is null.");
            }

            _Service = service;

            if (dbContext == null)
            {
                throw new ArgumentNullException("dbContext", "Argument cannot be null.");
            }

            _DbContext = dbContext;

            _UserManager = userManager;
            _RoleManager = roleManager;
        }
 public PresidentsController(IPresidentService presidentService)
 {
     this.presidentService = presidentService;
 }
예제 #8
0
 public PresidentController(IPresidentService service)
 {
     _service = service;
 }
 public PresidentApplication(IPresidentService presidentService)
 {
     _presidentService = presidentService;
 }
예제 #10
0
 public Query(IPresidentService presidentService)
 {
     _presidentService = presidentService;
 }