| 
            
              ReusableObjectPoolTakeObjectT(Type) Method
             | 
          
        
        
            Gets an object from the pool, or creates a new one if no pool items are available.
            
        
        Namespace: GSFAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.258-beta+f8b6aa3dbfe0b4cc2b0b0760dd5d2a3dd4f59d09
Syntaxpublic static T TakeObject<T>(
	Type type
)
Public Shared Function TakeObject(Of T) ( 
	type As Type
) As T
public:
generic<typename T>
static T TakeObject(
	Type^ type
)
static member TakeObject : 
        type : Type -> 'T JavaScript does not support generic types or methods.
 View SourceParameters
- type  Type
 - Type of object to get from pool.
 
Type Parameters
- T
 - Type of returned object to get from pool.
 
Return Value
TAn available object from the pool, or a new one if no pool items are available.
Exceptions| Exception | Condition | 
|---|
| InvalidOperationException | type does not support parameterless public constructor -or- 
            type is not a subclass or interface implementation of function type definition.
             | 
Remarks
            This function will validate that T is related to type.
            
            If type implements ISupportLifecycle, the pool will attach
            to the item's Disposed event such that the object can be automatically
            restored to the pool upon Dispose. It will be up to class implementors to
            make sure Initialize makes the class ready for use as this method will
            always be called for an object being taken from the pool.
            
See Also