ChatApi/Services/ResponseService/ResponseFactory.cs
2024-11-28 22:49:03 -03:00

19 lines
548 B
C#

using System.Net.NetworkInformation;
namespace ChatApi.Services.ResponseService
{
public class ResponseFactory
{
private readonly IEnumerable<IResponseService> _responseServices;
public ResponseFactory(IEnumerable<IResponseService> responseService)
{
_responseServices = responseService;
}
public IResponseService? GetService(EnumClassification classification)
{
return _responseServices.FirstOrDefault(w => w.Classification == classification);
}
}
}