Beispiel #1
0
 /// <summary>
 /// Gets the pooled object.
 /// </summary>
 /// <typeparam name="TKey">The type of the t key.</typeparam>
 /// <typeparam name="TValue">The type of the t value.</typeparam>
 /// <param name="pool">The pool.</param>
 /// <returns>PooledObject&lt;Dictionary&lt;TKey, TValue&gt;&gt;.</returns>
 public static PooledObject <Dictionary <TKey, TValue> > GetPooledObject <TKey, TValue>(this ObjectPool <Dictionary <TKey, TValue> > pool)
 {
     return(PooledObject <Dictionary <TKey, TValue> > .Create(pool));
 }
Beispiel #2
0
 /// <summary>
 /// Gets the pooled object.
 /// </summary>
 /// <typeparam name="TItem">The type of the t item.</typeparam>
 /// <param name="pool">The pool.</param>
 /// <returns>PooledObject&lt;List&lt;TItem&gt;&gt;.</returns>
 public static PooledObject <List <TItem> > GetPooledObject <TItem>(this ObjectPool <List <TItem> > pool)
 {
     return(PooledObject <List <TItem> > .Create(pool));
 }
Beispiel #3
0
 /// <summary>
 /// Gets the pooled object.
 /// </summary>
 /// <param name="pool">The pool.</param>
 /// <returns>PooledObject&lt;StringBuilder&gt;.</returns>
 public static PooledObject <StringBuilder> GetPooledObject(this ObjectPool <StringBuilder> pool)
 {
     return(PooledObject <StringBuilder> .Create(pool));
 }