Exemple #1
0
        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);
        }
Exemple #2
0
 public bool Equals(HSession other)
 {
     return(string.Equals(Email, other.Email) && Enum.Equals(Hotel, other.Hotel));
 }