/// <summary>Indicates whether the current object is equal to another object of the same type.</summary> /// <returns>true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false.</returns> /// <param name="other">An object to compare with this object.</param> public bool Equals(ITimeSliceKey other) { if (other == null) { return(false); } return(Start == other.Start && End == other.End); }
/// <summary> /// Returns the item with the given <paramref name="id"/> /// </summary> /// <param name="id">The id of the item</param> /// <returns>The item with the <paramref name="id"/> or <c>null</c></returns> public TItem GetById(ITimeSliceKey id) { return(Items.TryGetValue(id, out var model) ? model : default(TItem)); }