IHierarchyItemAsyncGetPropertiesAsync Method
IT Hit WebDAV Classes Reference
Gets values of all properties or selected properties for this item.
Namespace:
ITHit.WebDAV.Server
Assembly:
ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 11.3.10719
Syntax Task<IEnumerable<PropertyValue>> GetPropertiesAsync(
IList<PropertyName> props,
bool allprop
)
Task<IEnumerable<PropertyValue>> GetPropertiesAsync(
IList<PropertyName> props,
bool allprop
)
Function GetPropertiesAsync (
props As IList(Of PropertyName),
allprop As Boolean
) As Task(Of IEnumerable(Of PropertyValue))
Function GetPropertiesAsync (
props As IList(Of PropertyName),
allprop As Boolean
) As Task(Of IEnumerable(Of PropertyValue))
Task<IEnumerable<PropertyValue^>^>^ GetPropertiesAsync(
IList<PropertyName>^ props,
bool allprop
)
Task<IEnumerable<PropertyValue^>^>^ GetPropertiesAsync(
IList<PropertyName>^ props,
bool allprop
)
abstract GetPropertiesAsync :
props : IList<PropertyName> *
allprop : bool -> Task<IEnumerable<PropertyValue>>
abstract GetPropertiesAsync :
props : IList<PropertyName> *
allprop : bool -> Task<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:
TaskIEnumerablePropertyValue
Enumerable with property values.
Exceptions Examples The code below is part of 'WebDAVServer.FileSystemStorage.AspNet' C# & VB samples provided with the SDK.
public async Task<IEnumerable<PropertyValue>> GetPropertiesAsync(IList<PropertyName> props, bool allprop)
{
List<PropertyValue> propertyValues = await GetPropertyValuesAsync();
PropertyName snippet = props.FirstOrDefault(s => s.Name == snippetProperty);
if (snippet.Name == snippetProperty && this is DavFile)
{
propertyValues.Add(new PropertyValue(snippet, ((DavFile)this).Snippet));
}
if (!allprop)
{
propertyValues = propertyValues.Where(p => props.Contains(p.QualifiedName)).ToList();
}
return propertyValues;
}
Public Async Function GetPropertiesAsync(props As IList(Of PropertyName), allprop As Boolean) As Task(Of IEnumerable(Of PropertyValue)) Implements IHierarchyItemAsync.GetPropertiesAsync
Dim propertyValues As List(Of PropertyValue) = Await GetPropertyValuesAsync()
Dim snippet As PropertyName = props.FirstOrDefault(Function(s) s.Name = snippetProperty)
If snippet.Name = snippetProperty AndAlso TypeOf Me Is DavFile Then
propertyValues.Add(New PropertyValue(snippet, CType(Me, DavFile).Snippet))
End If
If Not allprop Then
propertyValues = propertyValues.Where(Function(p) props.Contains(p.QualifiedName)).ToList()
End If
Return propertyValues
End Function
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also