ISessionFactory Interface
Creates Session instances for structured logging in a HAKOM log database.
public interface ISessionFactoryRemarks
Section titled “Remarks”The session factory is responsible for creating new sessions (with unique identifiers) and for producing inactive copies of existing sessions when they are closed. Register the default implementation with the container via UseSessionFactory(this IContainer).
Sessions are typically not created directly through this factory by consumer code. Instead, use BeginSession(this ILogger) which internally delegates to this factory.
Methods
Section titled “Methods”ISessionFactory.Create() Method
Section titled “ISessionFactory.Create() Method”Creates a new active Session with a unique identifier.
HAKOM.Logging.HakomDatabaseLog.Net.Api.Session Create();Returns
Section titled “Returns”Session
A new Session with Active set to true.
ISessionFactory.Inactive(Session) Method
Section titled “ISessionFactory.Inactive(Session) Method”Creates an inactive copy of the given session, preserving its identifier but setting Active to false.
HAKOM.Logging.HakomDatabaseLog.Net.Api.Session Inactive(HAKOM.Logging.HakomDatabaseLog.Net.Api.Session session);Parameters
Section titled “Parameters”session Session
The Session to inactivate.
Returns
Section titled “Returns”Session
A new Session with the same identity as session but with Active set to false.