Files
marechai/Marechai/Services/Register.cs

98 lines
4.2 KiB
C#

/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ 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-2026 Natalia Portillo
*******************************************************************************/
using Marechai.Shared;
using Marechai.Theming;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
namespace Marechai.Services;
public static class Register
{
internal static void RegisterServices(IServiceCollection services)
{
services.AddSingleton<StringLocalizer<NavMenu>>();
// Shared lookup-table memo (countries, languages, licenses, families,
// ISO standards). Scoped service over the singleton IMemoryCache, so
// every circuit reuses the same in-process cache.
services.AddScoped<ReferenceDataCache>();
services.AddScoped<NewsService>();
services.AddScoped<CompaniesService>();
services.AddScoped<CompanyLogosService>();
services.AddScoped<ComputersService>();
services.AddScoped<ConsolesService>();
services.AddScoped<CountriesService>();
services.AddScoped<MachinesService>();
services.AddScoped<MachineFamiliesService>();
services.AddScoped<MachinePhotosService>();
services.AddScoped<GpuPhotosService>();
services.AddScoped<SoundSynthPhotosService>();
services.AddScoped<ProcessorPhotosService>();
services.AddScoped<GpusService>();
services.AddScoped<InstructionSetsService>();
services.AddScoped<InstructionSetExtensionsService>();
services.AddScoped<ProcessorsService>();
services.AddScoped<ResolutionsService>();
services.AddScoped<ScreensService>();
services.AddScoped<SoundSynthsService>();
services.AddScoped<BooksService>();
services.AddScoped<DocumentsService>();
services.AddScoped<MagazinesService>();
services.AddScoped<PeopleService>();
services.AddScoped<PeopleByCompanyService>();
services.AddScoped<SoftwareService>();
services.AddScoped<SoftwareFamiliesService>();
services.AddScoped<SoftwarePlatformsService>();
services.AddScoped<SoftwareAttributesService>();
services.AddScoped<SoftwareVersionsService>();
services.AddScoped<SoftwareReleasesService>();
services.AddScoped<SmartphonesService>();
services.AddScoped<PdasService>();
services.AddScoped<TabletsService>();
services.AddScoped<AuthService>();
services.AddScoped<UsersService>();
services.AddScoped<InvitationCodesService>();
services.AddScoped<ProfileService>();
services.AddScoped<CollectionService>();
services.AddScoped<MessagingService>();
services.AddScoped<ReviewReportService>();
services.AddScoped<SearchService>();
services.AddScoped<SuggestionsService>();
services.AddScoped<OldDosImportsService>();
services.AddScoped<WwpcImportsService>();
services.AddScoped<ThemeStateService>();
services.AddScoped<ThemeFontLoader>();
services.AddSingleton<SitemapService>();
services.AddSingleton<IndexNowService>();
services.AddHostedService<IndexNowBackgroundService>();
}
}