Class Lock
A generic implementation of the ILock interface.
Inherited Members
Namespace:FubarDev.WebDavServer.Locking
Assembly:FubarDev.WebDavServer.dll
Syntax
public class Lock : ILock
Constructors
| Improve this Doc View SourceLock(String, String, Boolean, XElement, LockAccessType, LockShareMode, TimeSpan)
Initializes a new instance of the Lock class.
Declaration
public Lock([NotNull] string path, [NotNull] string href, bool recursive, [CanBeNull] XElement owner, LockAccessType accessType, LockShareMode shareMode, TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
String | path | The file system path (root-relative) this lock should be applied to |
String | href | The href this lock should be applied to (might be relative or absolute) |
Boolean | recursive | Must the lock be applied recursively to all children? |
XElement | owner | The owner of the lock |
LockAccessType | accessType | The LockAccessType of the lock |
LockShareMode | shareMode | The LockShareMode of the lock |
TimeSpan | timeout | The lock timeout |
Lock(String, String, Boolean, XElement, String, String, TimeSpan)
Initializes a new instance of the Lock class.
Declaration
protected Lock([NotNull] string path, [NotNull] string href, bool recursive, [CanBeNull] XElement owner, [NotNull] string accessType, [NotNull] string shareMode, TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
String | path | The file system path (root-relative) this lock should be applied to |
String | href | The href this lock should be applied to (might be relative or absolute) |
Boolean | recursive | Must the lock be applied recursively to all children? |
XElement | owner | The owner of the lock |
String | accessType | The LockAccessType of the lock |
String | shareMode | The LockShareMode of the lock |
TimeSpan | timeout | The lock timeout |
Lock(Uri, Uri, Boolean, XElement, LockAccessType, LockShareMode, TimeSpan)
Initializes a new instance of the Lock class.
Declaration
public Lock([NotNull] Uri path, [NotNull] Uri href, bool recursive, [CanBeNull] XElement owner, LockAccessType accessType, LockShareMode shareMode, TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
Uri | path | The file system path (root-relative) this lock should be applied to |
Uri | href | The href this lock should be applied to (might be relative or absolute) |
Boolean | recursive | Must the lock be applied recursively to all children? |
XElement | owner | The owner of the lock |
LockAccessType | accessType | The LockAccessType of the lock |
LockShareMode | shareMode | The LockShareMode of the lock |
TimeSpan | timeout | The lock timeout |
Properties
| Improve this Doc View SourceAccessType
Gets the access type of the lock
Declaration
public string AccessType { get; }
Property Value
Type | Description |
---|---|
String |
Implements
See Also
| Improve this Doc View SourceHref
Gets the href the lock is for
Declaration
public string Href { get; }
Property Value
Type | Description |
---|---|
String |
Implements
| Improve this Doc View SourceOwner
Gets the XML specifying the owner of the lock.
Declaration
public XElement Owner { get; }
Property Value
Type | Description |
---|---|
XElement |
Path
Gets the path the lock is for
Declaration
public string Path { get; }
Property Value
Type | Description |
---|---|
String |
Implements
| Improve this Doc View SourceRecursive
Gets a value indicating whether the lock must be applied recusively
Declaration
public bool Recursive { get; }
Property Value
Type | Description |
---|---|
Boolean |
Implements
| Improve this Doc View SourceShareMode
Gets the share mode of the lock
Declaration
public string ShareMode { get; }
Property Value
Type | Description |
---|---|
String |
Implements
See Also
| Improve this Doc View SourceTimeout
Gets the timeout of the lock
Declaration
public TimeSpan Timeout { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
Implements
Remarks
The lock is automatically released after the expiration of the timeout.
Methods
| Improve this Doc View SourceGetOwner()
Gets the XML identifying the owner of the lock
Declaration
public XElement GetOwner()
Returns
Type | Description |
---|---|
XElement | The XML identifying the owner of the lock |
Implements
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |