Preserves the original ExpandoObject without converting its type.
Implemented TryGetPropertyValue Method:
Safely accesses properties, returning a boolean indicating success and setting the out parameter to the property value or null if not found.
Created Unit Tests:
Tests for TryGetPropertyValue behavior and ensuring OriginalValue is correctly set in the constructor.
Reason for Changes
The issue involved the RuleParameter class transforming ExpandoObject into a strongly-typed object, causing a loss of the expected type when casting back. The changes ensure that both the original dynamic object and the typed version are accessible, maintaining data integrity throughout the workflow execution.
Summary of Changes
Added
OriginalValue
Property:ExpandoObject
without converting its type.Implemented
TryGetPropertyValue
Method:null
if not found.Created Unit Tests:
TryGetPropertyValue
behavior and ensuringOriginalValue
is correctly set in the constructor.Reason for Changes
The issue involved the
RuleParameter
class transformingExpandoObject
into a strongly-typed object, causing a loss of the expected type when casting back. The changes ensure that both the original dynamic object and the typed version are accessible, maintaining data integrity throughout the workflow execution.