diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-02-26 18:25:52 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-02-26 18:25:52 +0200 |
| commit | afb6bbb2123932b3562e1af993eb847d8147bf58 (patch) | |
| tree | a2c458a077551af5be35a729c4e6d976a92b9387 /Software/Visual_Studio/Tango.BL/ObservableEntity.cs | |
| parent | 61f2658295193dca0fdaa58744925d90bd2f4044 (diff) | |
| download | Tango-afb6bbb2123932b3562e1af993eb847d8147bf58.tar.gz Tango-afb6bbb2123932b3562e1af993eb847d8147bf58.zip | |
Major Changes Regarding RML & SPOOL parameters changes!
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/ObservableEntity.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.BL/ObservableEntity.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.BL/ObservableEntity.cs b/Software/Visual_Studio/Tango.BL/ObservableEntity.cs index e3bba77bd..a6dcdbbec 100644 --- a/Software/Visual_Studio/Tango.BL/ObservableEntity.cs +++ b/Software/Visual_Studio/Tango.BL/ObservableEntity.cs @@ -283,7 +283,7 @@ namespace Tango.BL foreach (var prop in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.SetMethod != null)) { - if (!prop.PropertyType.IsGenericType) + if (!prop.PropertyType.IsGenericTypeAndNotNullable()) { prop.SetValue(cloned, prop.GetValue(this)); } @@ -378,7 +378,7 @@ namespace Tango.BL if (flags.HasFlag(EntitySerializationFlags.IgnoreReferenceTypes)) { - var props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => !x.PropertyType.IsPrimitive && !x.PropertyType.IsGenericType && x.PropertyType != typeof(byte[]) && x.PropertyType != typeof(String) && x.PropertyType != typeof(DateTime)).ToList(); + var props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => !x.PropertyType.IsPrimitive && !x.PropertyType.IsGenericType && !x.PropertyType.IsNullable() && x.PropertyType != typeof(byte[]) && x.PropertyType != typeof(String) && x.PropertyType != typeof(DateTime)).ToList(); foreach (var prop in props) { @@ -388,7 +388,7 @@ namespace Tango.BL if (flags.HasFlag(EntitySerializationFlags.IgnoreCollections)) { - var props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericType).ToList(); + var props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericTypeAndNotNullable()).ToList(); foreach (var prop in props) { |
