Class ILifetimeManager<T>.Default
The default lifetime manager
Inheritance
System.Object
ILifetimeManager<T>.Default
Implements
Namespace: Solti.Utils.Primitives.Threading
Assembly: Solti.Utils.Primitives.dll
Syntax
public sealed class Default : Object, ILifetimeManager<T>
Constructors
Default(Func<T>)
Creates a new instance from the default lifetime manager.
Declaration
public Default(Func<T> factory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T> | factory |
Properties
Factory
The associated instance factory.
Declaration
public Func<T> Factory { get; }
Property Value
Type | Description |
---|---|
System.Func<T> |
Methods
CheckIn(T)
Resets the state of the item.
Declaration
public void CheckIn(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
CheckOut(T)
Prepares the item to be checked out.
Declaration
public void CheckOut(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Create()
Creates a new pool item.
Declaration
public T Create()
Returns
Type | Description |
---|---|
T |
Dispose(T)
Disposes a pool item.
Declaration
public void Dispose(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |