INotificationList.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System.Collections.Generic;
  2. namespace IPLocationServerTool.Model
  3. {
  4. /// <summary>
  5. /// Represents a collection which is readonly to outside of objects that can be individually accessed by index
  6. /// </summary>
  7. /// <typeparam name="T"></typeparam>
  8. public interface INotificationList<T> : IEnumerable<T>
  9. {
  10. #region Data Members and Events 
  11. // Data Members 
  12. /// <summary>
  13. /// Gets the number of elements contained in the <see cref="IReadableList{T}"/>
  14. /// </summary>
  15. int Count { get; }
  16. /// <summary>
  17. /// Gets the element at the specified index.
  18. /// </summary>
  19. /// <param name="index"></param>
  20. /// <returns></returns>
  21. T this[int index] { get; }
  22. bool IsEmpty { get; }
  23. #endregion Data Members and Events 
  24. #region Operations 
  25. /// <summary>
  26. /// Determines whether the <see cref="IReadableList{T}"/> contains a specific value.
  27. /// </summary>
  28. /// <param name="item"></param>
  29. /// <returns></returns>
  30. bool Contains(T item);
  31. /// <summary>
  32. /// Searches for the specified object
  33. /// and returns the zero-based index of the first occurrence within the entire <see cref="IReadableList{T}"/>.
  34. /// </summary>
  35. /// <param name="item"></param>
  36. /// <returns>
  37. /// The zero-based index of the first occurrence of item within the entire <see cref="IReadableList{T}"/>, if found;
  38. /// otherwise, –1.</returns>
  39. int IndexOf(T item);
  40. ///// <summary>
  41. ///// Gets the first element, if list is empty, then default value is returned
  42. ///// </summary>
  43. //T FirstOrDefault();
  44. ///// <summary>
  45. ///// Gets the last element, if list is empty, then default value is returned
  46. ///// </summary>
  47. //T LastOrDefault();
  48. #endregion Operations 
  49. }
  50. }