Пример #1
0
 public void Then_It_Path_Is_Stored()
 {
     _logicPathRepository
     .Get(_result.AppFileEntry.Id)
     .Should()
     .Be(_fileSystemEntryChange.Path);
 }
        protected override async Task Handle(SendRequestedFileCommand request, CancellationToken cancellationToken)
        {
            try
            {
                var path = _logicPathRepository
                           .Get(request.FileId);

                var content = FileHelper
                              .GetFileContent(path);

                var response = new FileContentResponse(request.Id, content);

                await _classroomHubClient
                .SendAsync(methodName : request.TargetMethod, response);

                _logger.LogDebug("Enviado contenido archivo {Id}",
                                 request.FileId);
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "No fue posible responder a la solicitud de contenido " +
                                 "de archivo {@Request} ", request);
            }
        }