sharee.bike-App/TINKLib/Model/Bikes/IBikeCollection.cs
2021-05-13 20:03:07 +02:00

35 lines
1 KiB
C#

using System.Collections.Generic;
namespace TINK.Model.Bike
{
public interface IBikeDictionary<T> : IReadOnlyCollection<T>
{
/// <summary>
/// Gets a bike by its id.
/// </summary>
/// <param name="p_iId"></param>
/// <returns></returns>
T GetById(int p_iId);
/// <summary>
/// Deteermines whether a bike by given key exists.
/// </summary>
/// <param name="p_strKey">Key to check.</param>
/// <returns>True if bike exists.</returns>
bool ContainsKey(int p_iId);
}
public interface IBikeDictionaryMutable<T> : IBikeDictionary<T>
{
/// <summary>
/// Removes a bike by its id.
/// </summary>
/// <param name="p_iId">Id of bike to be removed.</param>
void RemoveById(int p_iId);
/// <summary>
/// Adds a new element to dictinary.
/// </summary>
/// <param name="p_oNewElement">New element to add.</param>
void Add(T p_oNewElement);
}
}