aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Core/ExtensionMethods
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-03-30 00:56:02 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-03-30 00:56:02 +0300
commit091a4bdeb2feadb4962c6be5deb367ab56d81707 (patch)
tree289a672287063108b851b2831d4c699dcddd26d9 /Software/Visual_Studio/Tango.Core/ExtensionMethods
parent3d6a882cf14f36297d8b379e0fdf65376064edf7 (diff)
downloadTango-091a4bdeb2feadb4962c6be5deb367ab56d81707.tar.gz
Tango-091a4bdeb2feadb4962c6be5deb367ab56d81707.zip
Implemented PPC Updates & Packages.
Moved PPC/FSE interfaces to PPC.Shared. Changes Generic Serialization to json.
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/ExtensionMethods')
-rw-r--r--Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs
index cee991507..3b344ce56 100644
--- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs
+++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs
@@ -126,7 +126,11 @@ namespace Tango.Core.ExtensionMethods
var desProp = destination.GetType().GetProperty(prop.Name, BindingFlags.Public | BindingFlags.Instance);
- if (desProp != null && desProp.PropertyType == prop.PropertyType && desProp.SetMethod != null)
+ if (desProp != null && desProp.SetMethod != null && desProp.PropertyType.IsEnum && prop.PropertyType.IsEnum)
+ {
+ desProp.SetValue(destination, Enum.Parse(desProp.PropertyType, value.ToString()));
+ }
+ else if (desProp != null && desProp.PropertyType == prop.PropertyType && desProp.SetMethod != null)
{
desProp.SetValue(destination, value);
}