예제 #1
0
 // It is the CreateProtector() method of IDataProtectionProvider interface
 // that creates an instance of IDataProtector. CreateProtector() requires
 // a purpose string. So both IDataProtectionProvider and the class that
 // contains our purpose strings are injected using the contructor
 public OrderController(IorderRepositery IorderRepository, ApplicationDbContext context, IHostingEnvironment hosting, UserManager <ApplicationUser> _userManager, Microsoft.AspNetCore.Identity.UI.Services.IEmailSender emailSender, IDataProtectionProvider dataProtectionProvider, DataProctectionPurposeString dataProtectionPurposeStrings)
 {
     iOrderRepositery = IorderRepository;
     userManager      = _userManager;
     util             = new utilities(context, hosting);
     _emailSender     = emailSender;
     this.protector   = dataProtectionProvider.CreateProtector(
         dataProtectionPurposeStrings.OrderId);
 }
 public AdministrationController(RoleManager <IdentityRole> rolemanager, UserManager <ApplicationUser> usermanager, SignInManager <ApplicationUser> signinmanager, IHostingEnvironment hostingEnvironment, ApplicationDbContext db, IConfiguration configuration, Microsoft.AspNetCore.Identity.UI.Services.IEmailSender emailSender, IHubContext <NotificationHub> _hubContext)
 {
     Rolemanager             = rolemanager;
     Usermanager             = usermanager;
     Signinmanager           = signinmanager;
     this.hostingEnvironment = hostingEnvironment;
     hubContext   = _hubContext;
     _emailSender = emailSender;
     util         = new utilities(db, hostingEnvironment, configuration);
 }
예제 #3
0
 public RegisterModel(
     IUserProfileService userProfileService,
     UserManager <IdentityUser> userManager,
     SignInManager <IdentityUser> signInManager,
     ILogger <RegisterModel> logger,
     IEmailSender emailSender)
 {
     _userManager        = userManager;
     _signInManager      = signInManager;
     _logger             = logger;
     _emailSender        = emailSender;
     _userProfileService = userProfileService;
 }
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IOptions <IdentityOptions> identityCookieOptions,
     IEmailSender emailSender,
     ISmsSender smsSender,
     ILoggerFactory loggerFactory,
     IDomainNotificationHandler <DomainNotification> notifications,
     IOrganizadorAppService organizadorAppService,
     IUser user) : base(notifications, user)
 {
     _userManager           = userManager;
     _signInManager         = signInManager;
     _externalCookieScheme  = IdentityConstants.ExternalScheme;
     _emailSender           = emailSender;
     _smsSender             = smsSender;
     _organizadorAppService = organizadorAppService;
     _logger = loggerFactory.CreateLogger <AccountController>();
 }
예제 #5
0
 public ContactsController(IRepository <ContactForm> contactsRepository, Microsoft.AspNetCore.Identity.UI.Services.IEmailSender emailSender)
 {
     this.contactsRepository = contactsRepository;
     this.emailSender        = emailSender;
 }