Provides means for finding which properties failed to update.
For a list of all members of this type, see IPropertyMultistatusResponse Members.
This interface represents an individual description of an error in the list of errors returned by server. It provides the means for finding name of the property that failed to add, update or delete during the call to UpdateProperties. The PropertyName member of this class returns the name of the property that failed to add, update or delete.
string license = "<?xml version='1.0' encoding='utf...
WebDavSession session = new WebDavSession(license);
session.Credentials = new NetworkCredential("User1", "pwd");
IResource resource = session.OpenResource(new Uri("https://server/Library/doc.txt"));
Property[] propsToAddAndUpdate = new Property[3];
propsToAddAndUpdate[0] = new Property(new PropertyName("Ammount", "CorpNS"), "1200");
propsToAddAndUpdate[1] = new Property(new PropertyName("ManagerApproved", "Sales"), "Yes");
propsToAddAndUpdate[2] = new Property(new PropertyName("Branch", "Sales"), "EMEA Region");
PropertyName[] propsToDelete = new PropertyName[2];
propsToDelete[0] = new PropertyName("InternalName", "Sales");
propsToDelete[1] = new PropertyName("Counter", "CorpNS");
try
{
resource.UpdateProperties(propsToAddAndUpdate, propsToDelete);
}
catch(PropertyException ex)
{
// Find which properties failed to add/update/delete
foreach(IPropertyMultistatusResponse propInfo in ex.Multistatus.Responses)
{
Console.WriteLine(propInfo.PropertyName + " " + propInfo.Description);
}
}
Namespace: ITHit.WebDAV.Client
Assembly: ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll)
IPropertyMultistatusResponse Members | ITHit.WebDAV.Client Namespace