DataObjectPool.AddPrefetchedObjectToPool(Int32, Object, Boolean) 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.
Add a prefetched object to the pool with the specified ID.
public bool AddPrefetchedObjectToPool(int id, object objectToAdd, bool asNewest = true);
abstract member AddPrefetchedObjectToPool : int * obj * bool -> bool
override this.AddPrefetchedObjectToPool : int * obj * bool -> bool
Public Function AddPrefetchedObjectToPool (id As Integer, objectToAdd As Object, Optional asNewest As Boolean = true) As Boolean
Parameters
- id
- Int32
The id of object to add.
- objectToAdd
- Object
- asNewest
- Boolean
If true, add as newest item. If false, add as oldest item.
Returns
true if the object could be added to the pool, or false if not added, in which case caller should dispose of or destroy appropriately.