Beispiel #1
0
    public static List <string> GetUsersAliases(string dName, string uName)
    {
        List <string> userAliases = new List <string>();

        try
        {
            XMLayer xm = new XMLayer();
            xm = XMServer.CreateXMLayer();
            xm.Login();
            string raw = "";
            string line;
            raw = xm.ListAliases(dName, "*", uName);
            using (StringReader sr = new StringReader(raw))
            {
                while ((line = sr.ReadLine()) != null)
                {
                    line = line.Trim();
                    if (line == ".")
                    {
                        break;
                    }
                    userAliases.Add(extractUsersAliasName(line));
                }
            }
            xm.Logout();
        }
        catch (Exception error)
        {
            Log.WriteException(error);
        }
        return((userAliases.Count == 0) ? null : userAliases);
    }