DefaultObjectPool<T> Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
DefaultObjectPool<T>(IPooledObjectPolicy<T>) |
Creates an instance of DefaultObjectPool<T>. |
DefaultObjectPool<T>(IPooledObjectPolicy<T>, Int32) |
Creates an instance of DefaultObjectPool<T>. |
DefaultObjectPool<T>(IPooledObjectPolicy<T>)
- Source:
- DefaultObjectPool.cs
- Source:
- DefaultObjectPool.cs
- Source:
- DefaultObjectPool.cs
Creates an instance of DefaultObjectPool<T>.
public:
DefaultObjectPool(Microsoft::Extensions::ObjectPool::IPooledObjectPolicy<T> ^ policy);
public DefaultObjectPool (Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<T> policy);
new Microsoft.Extensions.ObjectPool.DefaultObjectPool<'T (requires 'T : null)> : Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<'T (requires 'T : null)> -> Microsoft.Extensions.ObjectPool.DefaultObjectPool<'T (requires 'T : null)>
Public Sub New (policy As IPooledObjectPolicy(Of T))
Parameters
- policy
- IPooledObjectPolicy<T>
The pooling policy to use.
Applies to
DefaultObjectPool<T>(IPooledObjectPolicy<T>, Int32)
- Source:
- DefaultObjectPool.cs
- Source:
- DefaultObjectPool.cs
- Source:
- DefaultObjectPool.cs
Creates an instance of DefaultObjectPool<T>.
public:
DefaultObjectPool(Microsoft::Extensions::ObjectPool::IPooledObjectPolicy<T> ^ policy, int maximumRetained);
public DefaultObjectPool (Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<T> policy, int maximumRetained);
new Microsoft.Extensions.ObjectPool.DefaultObjectPool<'T (requires 'T : null)> : Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<'T (requires 'T : null)> * int -> Microsoft.Extensions.ObjectPool.DefaultObjectPool<'T (requires 'T : null)>
Public Sub New (policy As IPooledObjectPolicy(Of T), maximumRetained As Integer)
Parameters
- policy
- IPooledObjectPolicy<T>
The pooling policy to use.
- maximumRetained
- Int32
The maximum number of objects to retain in the pool.