Esempio n. 1
0
        static AuthUserManager()
        {
            var strUserList = System.Configuration.ConfigurationManager.AppSettings["wcfclientuser"];
            var listusers = strUserList.Split(";".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
            foreach (var s in listusers)
            {
                var userpwdrole = s.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                var user = new AuthUser { UserName = userpwdrole[0], Password = userpwdrole[1] };

                if (userpwdrole.Length > 2)
                    user.Role = userpwdrole[2];

                AddUser(user);
            }
        }
Esempio n. 2
0
 public static void AddUser(AuthUser user)
 {
     list.Add(user);
 }
Esempio n. 3
0
 /// <summary>
 /// 添加用户
 /// </summary>
 public void AddUser(AuthUser user)
 {
     List.Add(user);
 }