Creates a session pool, store this pool somewhere where tour application threads can get to it.
Namespace:
VelocityDb.Session
Assembly:
VelocityDb (in VelocityDb.dll) Version: 11.1.0.0 (11.1)
Syntax public SessionPool(
int poolSize,
Func<SessionBase> createSessionFunc
)
Public Sub New (
poolSize As Integer,
createSessionFunc As Func(Of SessionBase)
)
public:
SessionPool(
int poolSize,
Func<SessionBase^>^ createSessionFunc
)
new :
poolSize : int *
createSessionFunc : Func<SessionBase> -> SessionPool
Parameters
- poolSize
- Type: SystemInt32
The maximum number of session maintained in the pool - createSessionFunc
- Type: SystemFuncSessionBase
A function provided by you that creates a session of your choice with your choice of parameters. Could be something as simple as: () => new SessionNoServer("MyDbDir")
See Also