Exemple #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);
            }
        }
Exemple #2
0
 public static void AddUser(AuthUser user)
 {
     list.Add(user);
 }
 /// <summary>
 /// 添加用户
 /// </summary>
 public void AddUser(AuthUser user)
 {
     List.Add(user);
 }