/// <summary> /// Inits the specified application. /// </summary> /// <param name="application">The application.</param> public void Init(HttpApplication application) { if (application == null) { return; } _repository = DataBasesRepository.GetInstance(); if (_repository.ExternalDisposeAction == null) { _repository.ExternalDisposeAction = (rep) => CloseAllDataBases(); } application.BeginRequest += ApplicationBeginRequest; application.EndRequest += ApplicationEndRequest; application.Error += ApplicationError; }
//SINGLETON internal static DataBasesRepository GetInstance() { return(_repository ?? (_repository = new DataBasesRepository())); }