Skip to content

Савенко Дмитрий#207

Open
Asrom11 wants to merge 1 commit intokontur-courses:masterfrom
Asrom11:master
Open

Савенко Дмитрий#207
Asrom11 wants to merge 1 commit intokontur-courses:masterfrom
Asrom11:master

Conversation

@Asrom11
Copy link
Copy Markdown

@Asrom11 Asrom11 commented Jan 23, 2025

.SelectMany(reader => reader.SupportedDocumentExtensions.Select(ext => new { ext, reader }))
.ToDictionary(x => x.ext, x => x.reader);
}
public Result<string[]?> ReadDocument(string filePath)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему string[]? ?
Когда мы тут без ошибки null вернём?


public Result<string[]?> ReadDocument(string filePath)
{
using var doc = WordprocessingDocument.Open(filePath, false);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А тут не будет ошибки, если документа по пути не найдется?

var options = optionsResult.Value;
var containerResult = Result.Of(() => DependencyInjectionConfig.BuildContainer(options),
"Ошибка при настройке контейнера зависимостей.");
if (containerResult.IsSuccess)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Неправильное условие: из-за этого программа не запускается

var generatorResult = Result.Of(() =>
scope.Resolve<ITagCloudGenerator>(),
"Ошибка при разрешении зависимости ITagCloudGenerator.");
if (generatorResult.IsSuccess)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Неправильное условие: из-за этого программа не запускается

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants