コード例 #1
0
        private void SaveUser(UserSignUpInformation userInformation)
        {
            if (!Directory.Exists(FilePath))
            {
                Directory.CreateDirectory(FilePath);
            }

            string        xml;
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(UsersConfiguration));

            var allUsers = GetAllUsers();

            allUsers.Add(userInformation);

            using (var sww = new StringWriter())
            {
                using (XmlWriter writer = XmlWriter.Create(sww))
                {
                    xmlSerializer.Serialize(writer, allUsers);
                    xml = sww.ToString(); // Your XML
                }

                File.WriteAllText(Path.Combine(FilePath, FileName), xml);
            }
        }
コード例 #2
0
 public void AddUserAccount(UserSignUpInformation userSignUpInformation)
 {
     throw new NotImplementedException();
 }