Skip to content

Conversation

@Kostornoj-Dmitrij
Copy link

No description provided.

Copy link

@PeterMotorniy PeterMotorniy left a comment

Choose a reason for hiding this comment

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

Ревью

[TestFixture]
public class ObjectPrinterAcceptanceTests
{
[Test]

This comment was marked as resolved.

[Test]
public Task ObjectPrinter_ShouldHandle_WhenExcludeType()
{
var person = new SimplePerson { Name = "Dima", Age = 20 };

This comment was marked as resolved.

if (obj is IEnumerable enumerable)
{
var text = new StringBuilder();
var pad = new string('\t', nestingLevel + 1);

This comment was marked as resolved.

{
if (count++ >= MaxCollectionItems)
{
text.Append(pad + "... (truncated)");

This comment was marked as resolved.


public ObjectPrinterSettings<TOwner> SetCustomSerialization<T>(Expression<Func<TOwner, T>> propertyExpression, Func<T, string> serializer)
{
var propertyName = GetPropertyInfo(propertyExpression);

This comment was marked as resolved.

@@ -0,0 +1,12 @@
List`1:

This comment was marked as resolved.

}

private static string AppendNewLine(string? text) =>
text != null && text.EndsWith(Environment.NewLine) ? text : text + Environment.NewLine;

This comment was marked as resolved.

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