46 lines
No EOL
1.6 KiB
C#
46 lines
No EOL
1.6 KiB
C#
using BuildingDirectory.Model;
|
|
|
|
namespace BuildingDirectory;
|
|
|
|
/// <summary>
|
|
/// Represents a simple building information system
|
|
/// </summary>
|
|
public sealed class BuildingInformation
|
|
{
|
|
private readonly MyDictionary<Floor, MyDictionary<string, Company>> _companiesPerFloor;
|
|
|
|
/// <summary>
|
|
/// Creates a new instance with the supplied building information
|
|
/// </summary>
|
|
/// <param name="companiesPerFloor"></param>
|
|
public BuildingInformation(MyDictionary<Floor, MyDictionary<string, Company>> companiesPerFloor)
|
|
{
|
|
_companiesPerFloor = companiesPerFloor;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns all floors in the building
|
|
/// </summary>
|
|
/// <returns>A list of available floors</returns>
|
|
// TODO
|
|
public List<Floor> GetFloorSelection() => new();
|
|
|
|
/// <summary>
|
|
/// Returns all companies residing on a specific floor.
|
|
/// If floor is not available null is returned.
|
|
/// </summary>
|
|
/// <param name="floor">The floor to check</param>
|
|
/// <returns>A list of names of companies residing on the provided floor</returns>
|
|
// TODO
|
|
public List<string>? GetCompaniesOnFloor(Floor floor) => null;
|
|
|
|
/// <summary>
|
|
/// Returns the company identified by floor and company name.
|
|
/// If the specified company is not found null is returned.
|
|
/// </summary>
|
|
/// <param name="floor">Floor to look at</param>
|
|
/// <param name="companyName">Name of the requested company</param>
|
|
/// <returns>Company information if found; null otherwise</returns>
|
|
// TODO
|
|
public Company? GetCompany(Floor floor, string companyName) => null;
|
|
} |