IHierarchyItem.GetPropertyValues Method 

IT Hit WebDAV for .NET

Retrieves values of specific properties.

[Visual Basic]
Function GetPropertyValues( _
   ByVal names As PropertyName() _
) As Property()
[C#]
Property[] GetPropertyValues(
   PropertyName[] names
);

Return Value

Array of requested properties with values.

Exceptions

Exception Type Condition
NotFoundException This item doesn't exist on the server.
PropertyForbiddenException User has not enough rights to obtain one of requested properties.
PropertyNotFoundException If one of requested properties was not found.
PropertyException Server returned unknown error for specific property.
WebDavHttpException Server returned unknown error.
WebDavException Unexpected error occurred.

Example

 string license = "<?xml version='1.0' encoding='utf...
 WebDavSession session = new WebDavSession(license);
 session.Credentials = new NetworkCredential("User1", "pwd", "DOMAIN");

 IHierarchyItem item = session.OpenResource(new Uri("https://server/Library/doc.txt"));
 PropertyName[] propNames = new PropertyName[2];
 propNames[0] = new PropertyName("ManagerApproved", "Sales");
 propNames[1] = new PropertyName("Branch", "Sales");

 Property[] properties = item.GetPropertyValues(propNames);

 foreach(Property prop in properties)
 {
     Console.WriteLine(prop.Name.NamespaceUri + ":" + prop.Name.Name + " " + prop.StringValue);
 }
 

See Also

IHierarchyItem Interface | ITHit.WebDAV.Client Namespace