IHierarchyItemGetProperties Method
IT Hit WebDAV Classes Reference
Gets values of all properties or selected properties for this item.
Namespace: ITHit.WebDAV.ServerAssembly: ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 4.5.3121.0
Syntax IEnumerable<PropertyValue> GetProperties(
IList<PropertyName> props,
bool allprop
)
Function GetProperties (
props As IList(Of PropertyName),
allprop As Boolean
) As IEnumerable(Of PropertyValue)
IEnumerable<PropertyValue^>^ GetProperties(
IList<PropertyName>^ props,
bool allprop
)
abstract GetProperties :
props : IList<PropertyName> *
allprop : bool -> IEnumerable<PropertyValue>
Parameters
- props
- Type: System.Collections.GenericIListPropertyName
IEnumerableT with property names which values are requested by WebDAV client.
If a property does not exist for this hierarchy item then the property value shall not be returned.
- allprop
- Type: SystemBoolean
If it is true it means that besides properties listed in props you need to
return all properties you think may be useful to client.
Return Value
Type:
IEnumerablePropertyValue
Enumerable with property values.
Exceptions Examples The code below is part of 'WebDAVServer.NtfsStorage' sample provided with the SDK.
public IEnumerable<PropertyValue> GetProperties(IList<PropertyName> names, bool allprop)
{
List<PropertyValue> propertyValues = getPropertyValues();
PropertyName snippet = names.FirstOrDefault(s => s.Name == SNIPPET);
if (snippet.Name == SNIPPET && this is DavFile)
propertyValues.Add(new PropertyValue(snippet, (this as DavFile).Snippet));
if (!allprop)
propertyValues = propertyValues.Where(property => names.Contains(property.QualifiedName)).ToList();
return propertyValues;
}
See Also