Class FakeLockProvider
Provides a fake implementation of the ILockProvider interface, typically used as a test double or non-functional placeholder.
public class FakeLockProvider : ILockProvider
- Inheritance
-
FakeLockProvider
- Implements
- Inherited Members
- Extension Methods
Methods
AcquireAsync(string, TimeSpan)
Asynchronously attempts to acquire a resource identified by the specified key within the given timeout.
This implementation always reports a successful acquisition by returning true.
public Task<bool> AcquireAsync(string key, TimeSpan timeout)
Parameters
keystringThe identifier of the resource to acquire.
timeoutTimeSpanThe maximum time to wait for the resource to become available.
Returns
- Task<bool>
A Task<TResult> that always completes with
true, indicating the resource was acquired.
ReleaseAsync(string)
Releases the resource associated with the specified key. This implementation completes immediately without performing any additional operation.
public Task ReleaseAsync(string key)
Parameters
keystringThe identifier of the resource to release.