Esempio n. 1
0
 public StoreAdmin(Hidistro.Membership.Core.Enums.UserRole userRole, HiMembershipUser membershipUser)
 {
     if (userRole != Hidistro.Membership.Core.Enums.UserRole.StoreAdmin)
     {
         throw new Exception("UserRole must be Member or Underling");
     }
     this.MembershipUser = membershipUser;
 }
Esempio n. 2
0
 public Member(Hidistro.Membership.Core.Enums.UserRole userRole, HiMembershipUser membershipUser)
 {
     if ((userRole != Hidistro.Membership.Core.Enums.UserRole.Member) && (userRole != Hidistro.Membership.Core.Enums.UserRole.Underling))
     {
         throw new Exception("UserRole must be Member or Underling");
     }
     this.MembershipUser = membershipUser;
 }
Esempio n. 3
0
 public Member(Hidistro.Membership.Core.Enums.UserRole userRole)
 {
     if (userRole != Hidistro.Membership.Core.Enums.UserRole.Member)
     {
         throw new Exception("UserRole must be Member or Underling");
     }
     this.MembershipUser = new HiMembershipUser(false, userRole);
 }
Esempio n. 4
0
 public HiMembershipUser(bool isAnonymous, Hidistro.Membership.Core.Enums.UserRole userRole)
 {
     if (isAnonymous && (userRole != Hidistro.Membership.Core.Enums.UserRole.Anonymous))
     {
         throw new Exception(string.Format("Current user is Anonymous, But the user role is '{0}'", userRole.ToString()));
     }
     this.UserRole    = userRole;
     this.IsAnonymous = userRole == Hidistro.Membership.Core.Enums.UserRole.Anonymous;
 }
Esempio n. 5
0
 public StoreAdmin()
 {
     Hidistro.Membership.Core.Enums.UserRole storeAdmin = Hidistro.Membership.Core.Enums.UserRole.StoreAdmin;
     this.MembershipUser = new HiMembershipUser(false, storeAdmin);
 }
Esempio n. 6
0
 public HiMembershipUser(bool isAnonymous, Hidistro.Membership.Core.Enums.UserRole userRole, MembershipUser mu) : this(isAnonymous, userRole)
 {
     this.RefreshMembershipUser(mu);
 }