Files
DMS/DMS.Infrastructure/Services/S7ServiceFactory.cs

27 lines
679 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using DMS.Infrastructure.Interfaces.Services;
using Microsoft.Extensions.Logging;
namespace DMS.Infrastructure.Services
{
/// <summary>
/// S7服务工厂实现用于创建S7Service实例
/// </summary>
public class S7ServiceFactory : IS7ServiceFactory
{
private readonly ILogger<S7Service> _logger;
public S7ServiceFactory(ILogger<S7Service> logger)
{
_logger = logger;
}
/// <summary>
/// 创建S7服务实例
/// </summary>
/// <returns>S7服务实例</returns>
public IS7Service CreateService()
{
return new S7Service(_logger);
}
}
}