SetProperties
MetadataPackage.SetProperties method
Sets known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well. This method is a combination of AddProperties and UpdateProperties. If an existing property satisfies the predicate its value is updated. If there is a known property missing in the package that satisfies the predicate it is added to the package.
public virtual int SetProperties(Func<MetadataProperty, bool> predicate, PropertyValue value)
| Parameter | Type | Description | 
|---|---|---|
| predicate | Func`2 | A function to test each metadata property for a condition. | 
| value | PropertyValue | A new value for the filtered properties. | 
Return Value
The number of affected properties.
Remarks
Please note that GroupDocs.Metadata implicitly checks the type of each filtered property. It’s impossible to set a property with a value having inappropriate type.
Learn more
See Also
- delegate Func<T,TResult>
 - class MetadataProperty
 - class PropertyValue
 - class MetadataPackage
 - namespace GroupDocs.Metadata.Common
 - assembly GroupDocs.Metadata