Skip to content

Шагов Владислав#247

Open
ShagovVladislav wants to merge 1 commit intokontur-courses:masterfrom
ShagovVladislav:hometask
Open

Шагов Владислав#247
ShagovVladislav wants to merge 1 commit intokontur-courses:masterfrom
ShagovVladislav:hometask

Conversation

@ShagovVladislav
Copy link
Copy Markdown

@ShagovVladislav ShagovVladislav changed the title All project, without reafactor and perfomance tests Шагов Владислав Nov 20, 2025
.ConfigureProperty(p => p.Age).WithSerialization(age => $"age: {age}")
// //5. Настроить обрезание строковых свойств (метод должен быть виден только для строковых свойств)
.ConfigureProperty(p => p.Name).Trim(0, 5)
// //6. Исключить из сериализации конкретного свойства
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Эти комментарии уже не нужны

//7. Синтаксический сахар в виде метода расширения, сериализующего по-умолчанию
//8. ...с конфигурированием
// 7. Синтаксический сахар - сериализация по-умолчанию
string defaultResult = person.PrintToString();
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 писать

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, но ты этого не видел

if (type == typeof(Guid))
return value.ToString();

return value.ToString() ?? "null";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

проверка на null уже выше есть

using FluentAssertions;
using NUnit.Framework;

namespace ObjectPrinting.Tests;
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