Class PoolItem<T>
- Namespace
- CapyKit
- Assembly
- CapyKit.dll
A pool item. This class cannot be inherited.
public sealed class PoolItem<T>
Type Parameters
TThe type of the pooled item.
- Inheritance
-
PoolItem<T>
- Inherited Members
- Extension Methods
Properties
Index
Gets the zero-based index of the pooled item.
public int Index { get; }
Property Value
- int
The index.
Item
Gets the pooled resource.
public T Item { get; }
Property Value
- T
The pooled resource.
Locked
Gets a value indicating whether this object is locked or not.
public bool Locked { get; }
Property Value
- bool
A value indicating whether this object is locked or not.
TypeName
Gets the name of the Type of the pooled item.
public string TypeName { get; }
Property Value
Methods
ReleaseLock()
Releases the lock on the item.
public void ReleaseLock()
Remarks
If the item is not locked, an error event is emitted.
SetLock()
Sets the lock on the item indicating that it is in use.
public bool SetLock()
Returns
Remarks
If the item is already locked, an error event is emitted.
ToString()
Returns a string that represents the current object and its lock state.
public override string ToString()
Returns
- string
A string that represents the current object and its lock state.