mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
fix: Fix get/set property extensions to work with deep properties
This commit is contained in:
parent
4bbf0aec37
commit
21c68905d0
1 changed files with 7 additions and 5 deletions
|
|
@ -150,11 +150,12 @@ namespace ICD.Common.Utils.Extensions
|
||||||
for (int i = 0; i < path.Length - 1; i++)
|
for (int i = 0; i < path.Length - 1; i++)
|
||||||
{
|
{
|
||||||
PropertyInfo info =
|
PropertyInfo info =
|
||||||
extends.GetType()
|
currentObject.GetType()
|
||||||
#if SIMPLSHARP
|
#if SIMPLSHARP
|
||||||
.GetCType()
|
.GetCType()
|
||||||
#endif
|
#endif
|
||||||
.GetProperty(path[i]);
|
.GetProperty(path[i]);
|
||||||
|
|
||||||
if (info == null)
|
if (info == null)
|
||||||
return false;
|
return false;
|
||||||
currentObject = info.GetValue(currentObject, null);
|
currentObject = info.GetValue(currentObject, null);
|
||||||
|
|
@ -197,11 +198,12 @@ namespace ICD.Common.Utils.Extensions
|
||||||
foreach (string node in path)
|
foreach (string node in path)
|
||||||
{
|
{
|
||||||
PropertyInfo info =
|
PropertyInfo info =
|
||||||
extends.GetType()
|
currentObject.GetType()
|
||||||
#if SIMPLSHARP
|
#if SIMPLSHARP
|
||||||
.GetCType()
|
.GetCType()
|
||||||
#endif
|
#endif
|
||||||
.GetProperty(node);
|
.GetProperty(node);
|
||||||
|
|
||||||
if (info == null)
|
if (info == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue