mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-23 23:56:26 +01:00
35 lines
1 KiB
C#
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="id"></param>
|
|
/// <returns></returns>
|
|
T GetById(string id);
|
|
|
|
/// <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(string id);
|
|
}
|
|
public interface IBikeDictionaryMutable<T> : IBikeDictionary<T>
|
|
{
|
|
/// <summary>
|
|
/// Removes a bike by its id.
|
|
/// </summary>
|
|
/// <param name="id">Id of bike to be removed.</param>
|
|
void RemoveById(string id);
|
|
|
|
/// <summary>
|
|
/// Adds a new element to dictinary.
|
|
/// </summary>
|
|
/// <param name="newElement">New element to add.</param>
|
|
void Add(T newElement);
|
|
}
|
|
}
|