ApplyChanges(object, in ApplyChangesContext)
Returns an object where the properties of the current object are overwritten or complemented by
the properties of another given object, but only for properties that are set in the changes object.
Declaration
object ApplyChanges(object changes, in ApplyChangesContext context)Parameters
| Type | Name | Description |
|---|---|---|
| object | changes | The object being applied on the current object. Property values in |
| ApplyChangesContext | context | Information about the context of the current operation, including the Axis indicating along which dimension the changes are being applied. |
Returns
| Type | Description |
|---|---|
| object | A new immutable instance of the same class representing the merged result. |
Remarks
The implementation should return a new object that combines the current instance and the changes instance.
For each property, if the property is set (non-null) in changes, use that value; otherwise, use the value
from the current instance.
The context parameter provides information about the merging axis (see ApplyChangesAxis),
which can be used to customize the merging behavior based on how the options are being inherited or combined.