public static UpdateFile FromString(string line)
{
if (line == null)
throw new ArgumentNullException("line");
if (line.StartsWith(" "))
line = line.TrimStart();
if (line.EndsWith(" "))
line = line.TrimEnd();
string[] segments = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
if (segments == null || segments.Length != 3)
{
throw new FormatException("Переданная строка имеет неверный формат");
}
long fileSize = long.Parse(segments[2]);
return new UpdateFile(segments[0], segments[1], fileSize);
}