private UserFactory GetMemberFactory() { if (this.UserRole != Hidistro.Membership.Core.Enums.UserRole.Member) { throw new Exception("UserRole must be Member or Underling"); } return(MemberFactory.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); }
public static UserFactory Create(UserRole role) { if (role == UserRole.Distributor) { return(DistributorFactory.Instance()); } if (role == UserRole.Member) { return(MemberFactory.Instance()); } if (role == UserRole.SiteManager) { return(ManagerFactory.Instance()); } if (role == UserRole.Underling) { return(UnderlingFactory.Instance()); } return(null); }