19 lines
548 B
C#
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);
|
|
}
|
|
}
|
|
}
|