Interface ILockService
A interface for service which provides locks for objects.
Namespace: Loehnert.Lisrt.Framework.Services
Assembly: Loehnert.Lisrt.dll
Syntax
public interface ILockService
Methods
AddLock(ILock)
Adds a lock.
Declaration
void AddLock(ILock obj)
Parameters
Type | Name | Description |
---|---|---|
ILock | obj | Lock object to add. |
AddLockRange(IEnumerable<ILock>)
Adds a multiple locks.
Declaration
void AddLockRange(IEnumerable<ILock> objects)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ILock> | objects | Lock object to add. |
GetLocksForObject(Object)
Get the locks for a object.
Declaration
IEnumerable<ILock> GetLocksForObject(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Object to compare. |
Returns
Type | Description |
---|---|
IEnumerable<ILock> | A enumeration of locks. |
ObjectIsLocked(Object)
Gets a value indicating whether the obj
is locked.
Declaration
bool ObjectIsLocked(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Object to compare. |
Returns
Type | Description |
---|---|
Boolean | A value indicating whether the |
RemoveLock(ILock)
Removes a lock.
Declaration
bool RemoveLock(ILock obj)
Parameters
Type | Name | Description |
---|---|---|
ILock | obj | Lock to remove. |
Returns
Type | Description |
---|---|
Boolean | A value indicating whether the lock is removed. |
RemoveLockRange(IEnumerable<ILock>)
Removes multiple locks.
Declaration
void RemoveLockRange(IEnumerable<ILock> objects)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ILock> | objects | Locks to remove. |
Events
LockChanged
Occurs when a lock is changed.
Declaration
event EventHandler<LockChangedEventargs> LockChanged
Event Type
Type | Description |
---|---|
System.EventHandler<LockChangedEventargs> |