Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CreateSuperAdminCommand" /> class.
 /// </summary>
 /// <param name="userManager">The user manager.</param>
 /// <param name="dateTimeService">The date time service.</param>
 /// <param name="prototype">The prototype.</param>
 /// <param name="password">The password.</param>
 public CreateSuperAdminCommand(UserManager <User> userManager, IDateTime dateTimeService, User prototype, string password)
 {
     _userManager     = userManager.ThrowIfArgumentIsNull(nameof(userManager));
     _dateTimeService = dateTimeService.ThrowIfArgumentIsNull(nameof(dateTimeService));
     _prototype       = prototype.ThrowIfArgumentIsNull(nameof(prototype));
     _password        = password.ThrowIfArgumentIsNull(nameof(password));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SeederCommandFactory" /> class.
 /// </summary>
 /// <param name="userManager">The user manager.</param>
 /// <param name="roleManager">The role manager.</param>
 /// <param name="queryMaterializer">The query materializer.</param>
 /// <param name="dateTimeService">The date time service.</param>
 public SeederCommandFactory(UserManager <User> userManager, RoleManager <Role> roleManager, IQueryMaterializer queryMaterializer, IDateTime dateTimeService)
 {
     _userManager       = userManager.ThrowIfArgumentIsNull(nameof(userManager));
     _roleManager       = roleManager.ThrowIfArgumentIsNull(nameof(roleManager));
     _queryMaterializer = queryMaterializer.ThrowIfArgumentIsNull(nameof(queryMaterializer));
     _dateTimeService   = dateTimeService.ThrowIfArgumentIsNull(nameof(dateTimeService));
 }