ObjectPoolProvider.Create 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.
Overloads
Create<T>() |
Creates an ObjectPool. |
Create<T>(IPooledObjectPolicy<T>) |
Creates an ObjectPool with the given IPooledObjectPolicy<T>. |
Create<T>()
- Source:
- ObjectPoolProvider.cs
- Source:
- ObjectPoolProvider.cs
- Source:
- ObjectPoolProvider.cs
- Source:
- ObjectPoolProvider.cs
- Source:
- ObjectPoolProvider.cs
Creates an ObjectPool.
public:
generic <typename T>
where T : class, gcnew() Microsoft::Extensions::ObjectPool::ObjectPool<T> ^ Create();
public Microsoft.Extensions.ObjectPool.ObjectPool<T> Create<T> () where T : class, new();
member this.Create : unit -> Microsoft.Extensions.ObjectPool.ObjectPool<'T (requires 'T : null and 'T : (new : unit -> 'T))> (requires 'T : null and 'T : (new : unit -> 'T))
Public Function Create(Of T As {Class, New}) () As ObjectPool(Of T)
Type Parameters
- T
The type to create a pool for.
Returns
Applies to
Create<T>(IPooledObjectPolicy<T>)
- Source:
- ObjectPoolProvider.cs
- Source:
- ObjectPoolProvider.cs
- Source:
- ObjectPoolProvider.cs
- Source:
- ObjectPoolProvider.cs
- Source:
- ObjectPoolProvider.cs
Creates an ObjectPool with the given IPooledObjectPolicy<T>.
public:
generic <typename T>
where T : class abstract Microsoft::Extensions::ObjectPool::ObjectPool<T> ^ Create(Microsoft::Extensions::ObjectPool::IPooledObjectPolicy<T> ^ policy);
public abstract Microsoft.Extensions.ObjectPool.ObjectPool<T> Create<T> (Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<T> policy) where T : class;
abstract member Create : Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<'T (requires 'T : null)> -> Microsoft.Extensions.ObjectPool.ObjectPool<'T (requires 'T : null)> (requires 'T : null)
Public MustOverride Function Create(Of T As Class) (policy As IPooledObjectPolicy(Of T)) As ObjectPool(Of T)
Type Parameters
- T
The type to create a pool for.
Parameters
- policy
- IPooledObjectPolicy<T>