ObjectPoolingAttribute Constructor (Boolean, Int32, Int32)

 

Initializes a new instance of the ObjectPoolingAttribute class and sets the Enabled, MaxPoolSize, and MinPoolSize properties.

Namespace:   System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

public:
ObjectPoolingAttribute(
	bool enable,
	int minPoolSize,
	int maxPoolSize
)

Parameters

enable
Type: System::Boolean

true to enable object pooling; otherwise, false.

minPoolSize
Type: System::Int32

The minimum pool size.

maxPoolSize
Type: System::Int32

The maximum pool size.

The following code example creates a new ObjectPoolingAttribute.

[ObjectPooling(true, 1, 10)]
public ref class ObjectPoolingAttributeCtorBoolIntInt : 
    public ServicedComponent
{
};

.NET Framework
Available since 1.1
Return to top
Show: