Example #1
0
 /// <summary>
 /// Método construtor.
 /// </summary>
 /// <param name="configuration">Instância do container de configurações.</param>
 /// <param name="provider">Instância do provedor de serviços</param>
 public IdentityUser(IConfiguration configuration, IServiceProvider provider)
 {
     this._configurations = configuration.GetConfigurations <SystemUserConfigurations>("SystemUser");
     this._provider       = provider;
     this.Principal       = this.GetPrincipal();
 }
 /// <summary>
 /// Método construtor.
 /// </summary>
 /// <param name="configurations">Instância do container de configurações.</param>
 /// <param name="accessor">Instância do acessor</param>
 public SystemUser(IConfiguration configurations, IHttpContextAccessor accessor)
 {
     this._configurations = configurations.GetSection("SystemUser").Get <SystemUserConfigurations>();
     this._accessor       = accessor;
     this.Principal       = this._accessor.HttpContext.User;
 }