Skip to content

feat: Add Task1 - #5

Open
ArtemNikit1n wants to merge 2 commits into
mainfrom
test1
Open

feat: Add Task1#5
ArtemNikit1n wants to merge 2 commits into
mainfrom
test1

Conversation

@ArtemNikit1n

Copy link
Copy Markdown
Owner

No description provided.

[SetUp]
public void SetUp()
{
testDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Надо было комментарии от StyleCop поправить, компилироваться надо без предупреждений


public class MultiThreadedChecksumCalculator
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

:(

{
if (string.IsNullOrEmpty(directoryPath))
{
throw new ArgumentNullException(nameof(directoryPath));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Лучше ArgumentNullException.ThrowIfNull. Потому что если строка пустая, кидать ArgumentNullException семантически неправильно, ну и в целом это отдельный случай. Опытные C#-разработчики вообще не рекомендуют метод IsNullOrEmpty, потому что надо понимать, где строка может быть null, а где пустой.

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.

3 participants