MetadataFindProperties Method |
Finds the metadata properties satisfying the specified predicate.
The search is recursive so it affects all nested packages as well.
Namespace: GroupDocs.MetadataAssembly: GroupDocs.Metadata (in GroupDocs.Metadata.dll) Version: 21.8
Syntaxpublic IEnumerable<MetadataProperty> FindProperties(
Func<MetadataProperty, bool> predicate
)
Public Function FindProperties (
predicate As Func(Of MetadataProperty, Boolean)
) As IEnumerable(Of MetadataProperty)
public:
IEnumerable<MetadataProperty^>^ FindProperties(
Func<MetadataProperty^, bool>^ predicate
)
member FindProperties :
predicate : Func<MetadataProperty, bool> -> IEnumerable<MetadataProperty>
Parameters
- predicate
- Type: GroupDocs.Metadata.CommonFuncMetadataProperty, Boolean
A function to test each metadata property for a condition.
Return Value
Type:
IEnumerableMetadataPropertyAn
IEnumerableT that contains properties from the package that satisfy the condition.
Remarks
Examples
This example demonstrates how to search for specific metadata properties using tags.
using (Metadata metadata = new Metadata(Constants.InputPptx))
{
var properties = metadata.FindProperties(p => p.Tags.Contains(Tags.Person.Editor) || p.Tags.Contains(Tags.Time.Modified));
foreach (var property in properties)
{
Console.WriteLine("Property name: {0}, Property value: {1}", property.Name, property.Value);
}
}
See Also