private UserFactory GetMemberFactory() { if (this.UserRole != Hidistro.Membership.Core.Enums.UserRole.StoreAdmin) { throw new Exception("UserRole must be Member or Underling"); } return StoreAdminFactory.Instance(); }
public static UserFactory Create(UserRole role) { if (role == UserRole.Member) { return(MemberFactory.Instance()); } if (role == UserRole.SiteManager) { return(ManagerFactory.Instance()); } if (role == UserRole.StoreAdmin) { return(StoreAdminFactory.Instance()); } return(null); }