Namespace: ITHit.WebDAV.Client
The Property type exposes the following members.
Name | Description | |
---|---|---|
Property(PropertyName, String) |
Initializes new string valued property.
| |
Property(String, String, String) |
Initializes new string valued property by given name and namespace.
|
Name | Description | |
---|---|---|
StringValue |
String value of the custom property.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString |
Returns string representation of current property.
(Overrides ObjectToString.) |
string license = "<?xml version='1.0' encoding='utf... WebDavSession session = new WebDavSession(license); session.Credentials = new NetworkCredential("User1", "pwd"); IFile file = await session.GetFileAsync(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 { await file.UpdatePropertiesAsync(propsToAddAndUpdate, propsToDelete); } catch(PropertyException ex) { Console.WriteLine(ex.Message + " " + ex.Status.Code + " " + ex.Status.Description); // Find which properties failed to add/update/delete foreach (IPropertyMultistatusResponse propInfo in ex.Multistatus.Responses) { Console.WriteLine(propInfo.PropertyName + " " + propInfo.Status.Code + " " + propInfo.Status.Description); } }