We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03a0f72 commit 8f03db6Copy full SHA for 8f03db6
Enbiso.NLib.EventInfo/Models/EventRecordMapper.cs
@@ -7,13 +7,14 @@ namespace Enbiso.NLib.EventInfo.Models;
7
8
public static class EventRecordMapper
9
{
10
- public static EventRecordProp Map(PropertyInfo property) =>
11
- new(property)
12
- {
13
- Props = property.PropertyType.GetProperties()
14
- .Where(p => ShouldExtract(p.PropertyType))
15
- .Select(p => new EventRecordProp(p)).ToList()
16
- };
+ public static EventRecordProp Map(PropertyInfo property)
+ {
+ var prop = new EventRecordProp(property);
+ if (!IsSimpleType(property.PropertyType))
+ prop.Props = property.PropertyType.GetProperties()
+ .Select(p => new EventRecordProp(p)).ToList();
+ return prop;
17
+ }
18
19
private static bool ShouldExtract(Type type)
20
0 commit comments