Method PushProperties
PushProperties(IEnumerable, PropertyInfo?, object?, ref ConcurrentStack<PropInstanceAndValue>?)
Iterates collection of the objects and changes the specified property value
for the each item. Old property values are pushed to the
oldValues
stack.
public static void PushProperties(IEnumerable objects, PropertyInfo? propInfo, object? newValue, ref ConcurrentStack<PropInstanceAndValue>? oldValues)
Parameters
objects
IEnumerableThe collection of objects.
propInfo
PropertyInfoProperty information.
newValue
objectNew value for the property.
oldValues
ConcurrentStack<PropInstanceAndValue>The stack to save old property values.
Remarks
You can use PopProperties(ConcurrentStack<PropInstanceAndValue>?) for restoring property values after saved them using PushProperties(IEnumerable, PropertyInfo?, object?, ref ConcurrentStack<PropInstanceAndValue>?).