-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUserAccountDataParser.cs
More file actions
32 lines (31 loc) · 1 KB
/
Copy pathUserAccountDataParser.cs
File metadata and controls
32 lines (31 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
namespace DownloadPlayerData
{
public class UserAccountDataParser
{
public static IReadOnlyList<UserAccountData> Parse(string file)
{
var data = System.IO.File.ReadAllLines(file);
var list = new List<UserAccountData>();
for (var i = 1; i < data.Length; ++i)
{
var line = data[i];
var details = line.Split('\t');
list.Add(new UserAccountData
{
Id = Guid.Parse(details[0]),
UserId = details[1],
UserName = details[2],
DisplayName = details[3],
Email = details[4],
PasswordHash = details[5],
// IsAdmin = details[6],
// IsModerator = details[7],
Created = DateTime.Parse(details[8])
});
}
return list;
}
}
}