public async Task <ServiceResponse <string> > Handle(RequestModel requestModel, string path) { _loggerService.Log("Start processing and inisialize classes"); ServiceResponse <string> response = new ServiceResponse <string>(); NotificationFactory notificationFactory = new NotificationFactory(_mapper); var notificationHandler = notificationFactory.CreateNotificationHandler(requestModel); string deliveredJson = notificationHandler.ToJson(); List <string> stringListToCount = notificationHandler.CreateListString(); if (path is null) { path = $"{_configProvider.DefaultDir}/{requestModel.Source.ToLower()}"; } WrapperIO wrapperService = new WrapperIO(path, deliveredJson, stringListToCount, requestModel.Source.ToLower(), _helperIO, requestModel.Id, _configProvider, _loggerService); _loggerService.Log("Start creating the first json"); wrapperService.CreateJson(); _loggerService.Log("Start creating the summary json"); await wrapperService.CreateSummaryJson(); response.Data = path; response.Message = "The process completed successfuly"; return(response); }