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