Interface ILockService
A interface for service which provides locks for objects.
public interface ILockService
Methods
AddLock(ILock)
Adds a lock.
void AddLock(ILock obj)
Parameters
obj
ILockLock object to add.
AddLockRange(IEnumerable<ILock>)
Adds a multiple locks.
void AddLockRange(IEnumerable<ILock> objects)
Parameters
objects
IEnumerable<ILock>Lock object to add.
GetLocksForObject(object)
Get the locks for a object.
IEnumerable<ILock> GetLocksForObject(object obj)
Parameters
obj
objectObject to compare.
Returns
- IEnumerable<ILock>
A enumeration of locks.
ObjectIsLocked(object)
Gets a value indicating whether the obj
is locked.
bool ObjectIsLocked(object obj)
Parameters
obj
objectObject to compare.
Returns
- bool
A value indicating whether the
obj
is locked.
RemoveLock(ILock)
Removes a lock.
bool RemoveLock(ILock obj)
Parameters
obj
ILockLock to remove.
Returns
- bool
A value indicating whether the lock is removed.
RemoveLockRange(IEnumerable<ILock>)
Removes multiple locks.
void RemoveLockRange(IEnumerable<ILock> objects)
Parameters
objects
IEnumerable<ILock>Locks to remove.
Events
LockChanged
Occurs when a lock is changed.
event EventHandler<LockChangedEventargs> LockChanged