Esempio n. 1
0
 public ComBoostPrincipal(IPrincipal user)
 {
     if (user == null)
         throw new ArgumentNullException("user");
     OriginPrincipal = user;
     Identity = new ComBoostIdentity(this);
 }
 public ComBoostPrincipal(IPrincipal user)
 {
     if (user == null)
     {
         throw new ArgumentNullException("user");
     }
     OriginPrincipal = user;
     Identity        = new ComBoostIdentity(this);
 }
Esempio n. 3
0
 /// <summary>
 /// Initialize comboost principal.
 /// </summary>
 /// <param name="user">Principal to wrapper.</param>
 public ComBoostPrincipal(IPrincipal user)
 {
     if (user == null)
         throw new ArgumentNullException("user");
     CurrentRoute = RouteTable.Routes.GetRouteData(new HttpContextWrapper(HttpContext.Current));
     if (ComBoostAuthentication.IsEnabled)
     {
         Identity = new ComBoostIdentity(this);
         OriginPrincipal = this;
     }
     else
     {
         Identity = user.Identity;
         OriginPrincipal = user;
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Initialize comboost principal.
 /// </summary>
 /// <param name="user">Principal to wrapper.</param>
 public ComBoostPrincipal(IPrincipal user)
 {
     if (user == null)
     {
         throw new ArgumentNullException("user");
     }
     CurrentRoute = RouteTable.Routes.GetRouteData(new HttpContextWrapper(HttpContext.Current));
     if (ComBoostAuthentication.IsEnabled)
     {
         Identity        = new ComBoostIdentity(this);
         OriginPrincipal = this;
     }
     else
     {
         Identity        = user.Identity;
         OriginPrincipal = user;
     }
 }