46 lines
No EOL
2 KiB
C#
46 lines
No EOL
2 KiB
C#
// ***********************************************************************
|
|
// Assembly : Service
|
|
// Author : frede
|
|
// Created : 2023 06 11 08:46
|
|
//
|
|
// Last Modified By : frede
|
|
// Last Modified On : 2023 06 11 08:46
|
|
// ***********************************************************************
|
|
// <copyright file="ServiceManager.cs" company="FCS">
|
|
// 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]
|
|
// </copyright>
|
|
// <summary></summary>
|
|
// ***********************************************************************
|
|
|
|
using AutoMapper;
|
|
using Contracts;
|
|
using Service.Contracts;
|
|
|
|
namespace Service;
|
|
|
|
public sealed class ServiceManager : IServiceManager
|
|
{
|
|
private readonly Lazy<ICompanyService> _companyService;
|
|
private readonly Lazy<IEmployeeService> _employeeService;
|
|
|
|
public ServiceManager(IRepositoryManager repositoryManager, ILoggerManager logger, IMapper mapper)
|
|
{
|
|
_companyService = new Lazy<ICompanyService>(() => new CompanyService(repositoryManager, logger, mapper));
|
|
_employeeService = new Lazy<IEmployeeService>(() => new EmployeeService(repositoryManager, logger, mapper));
|
|
}
|
|
|
|
public ICompanyService CompanyService => _companyService.Value;
|
|
public IEmployeeService EmployeeService => _employeeService.Value;
|
|
} |