Esempio n. 1
0
 public Member(ExhibFlat.Membership.Core.Enums.UserRole userRole, HiMembershipUser membershipUser)
 {
     if ((userRole != ExhibFlat.Membership.Core.Enums.UserRole.Member) && (userRole != ExhibFlat.Membership.Core.Enums.UserRole.Underling))
     {
         throw new Exception("UserRole must be Member or Underling");
     }
     this.MembershipUser = membershipUser;
 }
Esempio n. 2
0
 public HiMembershipUser(bool isAnonymous, ExhibFlat.Membership.Core.Enums.UserRole userRole)
 {
     if (isAnonymous && (userRole != ExhibFlat.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 == ExhibFlat.Membership.Core.Enums.UserRole.Anonymous;
 }
Esempio n. 3
0
 public HiMembershipUser(bool isAnonymous, ExhibFlat.Membership.Core.Enums.UserRole userRole, MembershipUser mu) : this(isAnonymous, userRole)
 {
     this.RefreshMembershipUser(mu);
 }