public bool Equals(ActivityLogRecord other)
		{
			if (ReferenceEquals(null, other))
			{
				return false;
			}
			if (ReferenceEquals(this, other))
			{
				return true;
			}
			return other.DateTime.Equals(DateTime) && Equals(other.Level, Level) && Equals(other.Message, Message) && Equals(other.Details, Details);
		}
Ejemplo n.º 2
0
 public bool Equals(ActivityLogRecord other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other.DateTime.Equals(DateTime) && Equals(other.Level, Level) && Equals(other.Message, Message) && Equals(other.Details, Details));
 }
        protected virtual IEnumerable <ActivityLogRecord> GetRecordsFromFile(ActivityFilter filter, string file)
        {
            return(GetFromLog(file, Enumerable.Empty <ActivityLogRecord>(),
                              (csvReader, defaultValue) =>
            {
                var records = new List <ActivityLogRecord>();
                while (csvReader.Read())
                {
                    ActivityLogRecord record = GetActivityRecord(csvReader);
                    if (filter.DateRange.IsInRangeIncludingEndDate(record.DateTime))
                    {
                        records.Add(record);
                    }
                }

                return records;
            }));
        }