示例#1
0
        public static User CreateUser(UserTypeDirectory userType, IUserService userService)
        {
            if (userType == UserTypeDirectory.Guest)
            {
                return(new GuestUser(userService, userType));
            }

            if (userType == UserTypeDirectory.Administrator)
            {
                return(new AdministratorUser(userService, userType));
            }

            return(new User(userService, userType));
        }
示例#2
0
 public static User CreateUser(IUserService userService, UserTypeDirectory userType)
 {
     return(new User(userService, userType));
 }
示例#3
0
 public User(IUserService userService, UserTypeDirectory userType)
 {
     _userService = userService;
     _userType    = userType;
 }
示例#4
0
 public AdministratorUser(IUserService userService, UserTypeDirectory userType) : base(userService, userType)
 {
 }
示例#5
0
 public GuestUser(IUserService userService, UserTypeDirectory userType) : base(userService, userType)
 {
 }
示例#6
0
 public User(UserTypeDirectory type)
 {
     _type = type;
 }
示例#7
0
 public User(UserTypeDirectory userType)
 {
     _userType = userType;
 }