<ObjectPooling(MinPoolSize := 2, MaxPoolSize := 5, _
CreationTimeout := 20000)> _
Public Class TestObjectPooling
Inherits ServicedComponent
Public Sub Perform ()
' Method contents go here.
End Sub
Protected Overrides Sub Activate()
' Called when removed from the pool.
End Sub
Protected Overrides Sub Deactivate()
' Called before deactivating or placing back in pool.
End Sub
Protected Overrides Function CanBePooled() As Boolean
' Called after Deactivate. Indicate your vote here.
Return True
End Function
End Class
[ObjectPooling(Enabled=true, MinPoolSize=2, MaxPoolSize=5, CreationTimeout=20000)]
public class TestObjectPooling : ServicedComponent
{
public void Perform ()
{
// Method contents go here.
}
protected override void Activate()
{
// Called when removed from the pool.
}
protected override void Deactivate()
{
// Called before deactivating or placing back in pool.
}
protected override bool CanBePooled()
{
// Called after Deactivate. Indicate your vote here.
return true;
}
}