Class LockManager
- Namespace
- DuetControlServer.IPC
- Assembly
- DuetControlServer.dll
Class to manage read/write locks of third-party plugins
public class LockManager
- Inheritance
-
LockManager
- Inherited Members
Constructors
LockManager(ObjectModel)
Class to manage read/write locks of third-party plugins
public LockManager(ObjectModel model)
Parameters
modelObjectModelObject model
Properties
IsLocked
Indicates if a third-party application has locked the object model for writing
public bool IsLocked { get; }
Property Value
Methods
LockMachineModel(Connection, CancellationToken)
Function to create a read/write lock to the object model
public void LockMachineModel(Connection connection, CancellationToken cancellationToken = default)
Parameters
connectionConnectionConnection that is locking the model
cancellationTokenCancellationTokenOptional cancellation token
LockMachineModelAsync(Connection, CancellationToken)
Function to create a read/write lock to the object model
public Task LockMachineModelAsync(Connection connection, CancellationToken cancellationToken = default)
Parameters
connectionConnectionConnection that is locking the model
cancellationTokenCancellationTokenOptional cancellation token
Returns
- Task
Asynchronous task
UnlockMachineModel(Connection)
Unlock the machine model again
public void UnlockMachineModel(Connection connection)
Parameters
connectionConnectionConnection that is unlocking the model