2021-05-13 20:03:07 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace TINK.Model.Bike
|
|
|
|
|
{
|
|
|
|
|
public interface IBikeDictionary<T> : IReadOnlyCollection<T>
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a bike by its id.
|
|
|
|
|
/// </summary>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
/// <param name="id"></param>
|
2021-05-13 20:03:07 +02:00
|
|
|
|
/// <returns></returns>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
T GetById(string id);
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deteermines whether a bike by given key exists.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="p_strKey">Key to check.</param>
|
|
|
|
|
/// <returns>True if bike exists.</returns>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
bool ContainsKey(string id);
|
2021-05-13 20:03:07 +02:00
|
|
|
|
}
|
|
|
|
|
public interface IBikeDictionaryMutable<T> : IBikeDictionary<T>
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Removes a bike by its id.
|
|
|
|
|
/// </summary>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
/// <param name="id">Id of bike to be removed.</param>
|
|
|
|
|
void RemoveById(string id);
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds a new element to dictinary.
|
|
|
|
|
/// </summary>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
/// <param name="newElement">New element to add.</param>
|
|
|
|
|
void Add(T newElement);
|
2021-05-13 20:03:07 +02:00
|
|
|
|
}
|
|
|
|
|
}
|