Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IObjectWrapper.SetPropertyValues(IPropertyValues, Boolean) Method

Set a number of property values in bulk with full control over behavior.

[Visual Basic]
Public Sub SetPropertyValues( _
   ByVal values As IPropertyValues, _
   ByVal ignoreUnknown As Boolean _
)
[C#]
void SetPropertyValues(
   IPropertyValues values,
   bool ignoreUnknown
);

Parameters

values
The IPropertyValues to set on the target object
ignoreUnknown
Should we ignore unknown values (not found in the object!?)

Remarks

Note that performing a bulk update differs from performing a single update, in that an implementation of this class will continue to update properties if a recoverable error (such as a vetoed property change or a type mismatch, but not an invalid property name or the like) is encountered, throwing a PropertyAccessExceptionsException containing all the individual errors. This exception can be examined later to see all binding errors. Properties that were successfully updated stay changed.

Does not allow the setting of unknown fields.

See Also

IObjectWrapper Interface | Spring.Objects Namespace | IObjectWrapper.SetPropertyValues Overload List