using System;
using System.Collections.Generic;
using System.Net;
using System.Web;
using WebDAVSharp.Server.Adapters;
using WebDAVSharp.Server.Stores;
namespace WebDAVSharp.Server.MethodHandlers {
///
/// This class implements the PUT HTTP method for WebDAV#.
///
internal class WebDavUnlockMethodHandler : WebDavMethodHandlerBase, IWebDavMethodHandler {
///
/// Gets the collection of the names of the HTTP methods handled by this instance.
///
///
/// The names.
///
public IEnumerable Names {
get {
return new[]
{
"UNLOCK"
};
}
}
///
/// Processes the request.
///
/// The through which the request came in from the client.
/// The
/// object containing both the request and response
/// objects to use.
/// The that the is hosting.
public void ProcessRequest(WebDavServer server, HttpContext context, IWebDavStore store, String fileName) {
// Get the parent collection of the item
IWebDavStoreCollection collection = GetParentCollection(server, store, fileName);
// Get the item from the collection
IWebDavStoreItem item = GetItemFromCollection(collection, fileName);
/***************************************************************************************************
* Send the response
***************************************************************************************************/
context.SendSimpleResponse(HttpStatusCode.NoContent);
}
}
}