// *********************************************************************** // Assembly : Service // Author : frede // Created : 2023 06 11 08:46 // // Last Modified By : frede // Last Modified On : 2023 06 11 08:46 // *********************************************************************** // // Copyright (C) 2023-2023 FCS Frede's Computer Services. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero 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 Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see [https://www.gnu.org/licenses] // // // *********************************************************************** using AutoMapper; using Contracts; using Service.Contracts; namespace Service; public sealed class ServiceManager : IServiceManager { private readonly Lazy _companyService; private readonly Lazy _employeeService; public ServiceManager(IRepositoryManager repositoryManager, ILoggerManager logger, IMapper mapper) { _companyService = new Lazy(() => new CompanyService(repositoryManager, logger, mapper)); _employeeService = new Lazy(() => new EmployeeService(repositoryManager, logger, mapper)); } public ICompanyService CompanyService => _companyService.Value; public IEmployeeService EmployeeService => _employeeService.Value; }