Files
marechai/Marechai/Services/Register.cs

50 lines
2.0 KiB
C#
Raw Normal View History

2020-05-21 17:23:46 +01:00
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Filename : Register.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Register services for injection
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
2020-05-21 18:52:40 +01:00
using Marechai.Shared;
2020-05-21 17:23:46 +01:00
using Microsoft.Extensions.DependencyInjection;
2020-05-21 18:52:40 +01:00
using Microsoft.Extensions.Localization;
2020-05-21 17:23:46 +01:00
namespace Marechai.Services
{
public static class Register
{
2020-05-21 18:52:40 +01:00
internal static void RegisterServices(IServiceCollection services)
{
services.AddSingleton<StringLocalizer<NavMenu>>();
2020-05-21 17:23:46 +01:00
2020-05-21 18:52:40 +01:00
// TODO: Use reflection
2020-05-21 17:23:46 +01:00
services.AddScoped<NewsService>();
2020-05-21 20:25:47 +01:00
services.AddScoped<CompaniesService>();
2020-05-22 01:08:12 +01:00
services.AddScoped<ComputersService>();
services.AddScoped<ConsolesService>();
2020-05-21 18:52:40 +01:00
}
2020-05-21 17:23:46 +01:00
}
}