-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Зубакин Ренат #196
base: master
Are you sure you want to change the base?
Зубакин Ренат #196
Conversation
ObjectPrinting/PrintingConfig.cs
Outdated
private readonly Dictionary<MemberInfo, Delegate> customPropertySerialize = | ||
new Dictionary<MemberInfo, Delegate>(); | ||
|
||
private readonly Dictionary<Type, Delegate> customTypeSerializers = new Dictionary<Type, Delegate>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут же явно можно положить какая функция тут лежит
ObjectPrinting/PrintingConfig.cs
Outdated
private HashSet<object> visitedObjects = new HashSet<object>(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Этим множеством ты убиваешь одновременный запуск сериализаторого твоего
ObjectPrinting/PrintingConfig.cs
Outdated
if (obj is IDictionary) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obj is IDictionary dictionary
public string PrintToString(TOwner obj) | ||
{ | ||
return PrintToString(obj, 0); | ||
} | ||
|
||
private string PrintToString(object obj, int nestingLevel) | ||
{ | ||
var builder = new StringBuilder(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кадется лишнее поле
ObjectPrinting/PrintingConfig.cs
Outdated
private bool IsExclude(MemberInfo member) | ||
{ | ||
return excludedTypes.Contains(member.GetType()) || excludedProperty.Contains(member); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Получай PropertyInfo и member.PropertyType сработает все
@Pasha0666