MetadataFindProperties Method
Finds the metadata properties satisfying the specified predicate. The search is recursive so it affects all nested packages as well.

Namespace: GroupDocs.Metadata
Assembly: GroupDocs.Metadata (in GroupDocs.Metadata.dll) Version: 20.10
Syntax
public IEnumerable<MetadataProperty> FindProperties(
	Func<MetadataProperty, bool> predicate
)

Parameters

predicate
Type: GroupDocs.Metadata.CommonFuncMetadataProperty, Boolean
A function to test each metadata property for a condition.

Return Value

Type: IEnumerableMetadataProperty
An IEnumerableT that contains properties from the package that satisfy the condition.
Remarks
Learn more
Examples
This example demonstrates how to search for specific metadata properties using tags.
C#
using (Metadata metadata = new Metadata(Constants.InputPptx))
{
    // Fetch all the properties satisfying the predicate:
    // property contains the name of the last document editor OR the date/time the document was last modified
    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