ObjectPool.Create<T>(IPooledObjectPolicy<T>) Method
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.
Creates an ObjectPool with the given IPooledObjectPolicy<T>.
public static Microsoft.Extensions.ObjectPool.ObjectPool<T> Create<T> (Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<T>? policy = default) where T : class, new();
static member Create : Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<'T (requires 'T : null and 'T : (new : unit -> 'T))> -> Microsoft.Extensions.ObjectPool.ObjectPool<'T (requires 'T : null and 'T : (new : unit -> 'T))> (requires 'T : null and 'T : (new : unit -> 'T))
Public Shared Function Create(Of T As {Class, New}) (Optional policy As IPooledObjectPolicy(Of T) = Nothing) As ObjectPool(Of T)
Type Parameters
- T
The type to create a pool for.
Parameters
- policy
- IPooledObjectPolicy<T>
Returns
Applies to
Collabora con noi su GitHub
L'origine di questo contenuto è disponibile in GitHub, in cui è anche possibile creare ed esaminare i problemi e le richieste pull. Per ulteriori informazioni, vedere la guida per i collaboratori.