public static IEnumerable <PhoneActivityEntry> FromBinary(BinaryReader binaryReader) { while (!binaryReader.IsEOF()) { yield return(PhoneActivityEntry.SingleFromBinary(binaryReader)); } }
public static IEnumerable <(string, PhoneActivityEntry)> ExtractWithTimestamp(Stream dataStream) { foreach (var line in dataStream.ReadLines()) { var phoneActivityEntry = PhoneActivityEntry.TryParse(line); if (phoneActivityEntry.HasValue) { yield return(phoneActivityEntry.Value); } } }
public bool Equals(PhoneActivityEntry other) => From == other.From && To == other.To && Amount.Equals(other.Amount);