public static HSession[] Extract(string Path, char Delimiter = ':') { string[] Lines = File.ReadAllLines(Path); Lines = Lines.Where(S => !string.IsNullOrEmpty(S)).ToArray(); HSession[] Sessions = new HSession[Lines.Length]; for (int i = 0; i < Lines.Length; i++) { string[] Credentials = Lines[i].Split(Delimiter); Sessions[i] = new HSession(Credentials[0], Credentials[1], (HHotels)Enum.Parse(typeof(HHotels), Credentials[2].Replace('_', '.'))); } return(Sessions); }
public bool Equals(HSession other) { return(string.Equals(Email, other.Email) && Enum.Equals(Hotel, other.Hotel)); }