public bool CreateUser(UserData data)
        {
            bool result = false;
            if ((data == null) || (doc == null))
                return false;
            try
            {
                XElement newUser = new XElement("User",
                                                new XAttribute("name", data.UserName),
                                                new XElement("AppId", data.AppId),
                                                new XElement("AccessKey", data.AccessKey),
                                                new XElement("Email", data.Email),
                                                new XElement("Password", data.Password)
                                                );

                XElement main = doc.Element("Configuration");
                main.Add(newUser);
                doc.Save(config);
                result = true;

                LoggingModule.Instance.WriteMessage(LoggingModule.Severity.Information, data.ToString());
            }
            catch { }
            return result;
        }
        public bool RemoveData(UserData data)
        {
            bool result = false;
            if ((data == null) || (doc == null))
                return false;

            if (doc != null)
            {
                XElement element = (from c in doc.Element("Configuration").Elements("User")
                                    where c.Attribute("name").Value.ToLower() == data.UserName.ToLower()
                                    select c).FirstOrDefault();
                element.Remove();
                doc.Save(config);
                result = true;
                LoggingModule.Instance.WriteMessage(LoggingModule.Severity.Warning, data.ToString());
            }

            return result;
        }