Exemplo n.º 1
0
 public static void CreateFile(string path)
 {
     using (Stream writer = new FileStream(path + "\\" + FileName, FileMode.Create))
     {
         var           param      = new UsersProvider(true);
         XmlSerializer serializer = new XmlSerializer(typeof(UsersProvider));
         serializer.Serialize(writer, param);
     }
 }
Exemplo n.º 2
0
 private void LoadUsers()
 {
     _userProvider = UsersProvider.LoadLogins(_basePath);
     _adminPass    = _userProvider.AdminPass;
     _usersLock.EnterWriteLock();
     _users.Clear();
     foreach (var item in _userProvider.Logins)
     {
         _users.Add(item.Login, item);
     }
     _usersLock.ExitWriteLock();
 }