mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 12:45:01 +00:00
fix: fixing 2008 compatibiltiy issues
This commit is contained in:
committed by
Chris Cameron
parent
5d9369b582
commit
c6b2cd78cc
@@ -186,9 +186,9 @@ namespace ICD.Common.Utils.Extensions
|
|||||||
public static PropertyInfo GetPropertyInfo([NotNull] this object extends, [NotNull] params string[] path)
|
public static PropertyInfo GetPropertyInfo([NotNull] this object extends, [NotNull] params string[] path)
|
||||||
{
|
{
|
||||||
if (extends == null)
|
if (extends == null)
|
||||||
throw new ArgumentNullException(nameof(extends));
|
throw new ArgumentNullException("extends");
|
||||||
if (path == null)
|
if (path == null)
|
||||||
throw new ArgumentNullException(nameof(path));
|
throw new ArgumentNullException("path");
|
||||||
|
|
||||||
object currentObject = extends;
|
object currentObject = extends;
|
||||||
|
|
||||||
@@ -202,11 +202,15 @@ namespace ICD.Common.Utils.Extensions
|
|||||||
.GetProperty(path[i]);
|
.GetProperty(path[i]);
|
||||||
if (info == null)
|
if (info == null)
|
||||||
return null;
|
return null;
|
||||||
currentObject = info.GetValue(currentObject);
|
currentObject = info.GetValue(currentObject, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set the property to the value
|
//Set the property to the value
|
||||||
return currentObject.GetType().GetProperty(path[path.Length - 1]);
|
return currentObject.GetType()
|
||||||
|
#if SIMPLSHARP
|
||||||
|
.GetCType()
|
||||||
|
#endif
|
||||||
|
.GetProperty(path[path.Length - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user