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
objectsIEnumerableThe collection of objects.
propInfoPropertyInfoProperty information.
newValueobjectNew value for the property.
oldValuesConcurrentStack<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>?).