public MySQLPlatformDatabaseServices(IRuntimeDatabaseConfiguration databaseConfiguration) : base(databaseConfiguration) { objectFactory = new MySQLPlatformDatabaseObjectFactory(this); executionService = new ExecutionService.MySQLPlatformExecutionService(this); dmlService = new DMLService.MySQLPlatformDMLService(this); introspectionService = new MySQLPlatformIntrospectionService(this); ddlService = new DDLService.MySQLDDLService(this); sessionService = new Session.MySQLPlatformSessionService(this); }
internal static string Load(IPlatformSessionService s) { var appName = GetAppName(); var appHash = GetHashCode(appName.ToLower()); int existingHash; string existingAppName; if (s.Store(appName, appHash, out existingHash, out existingAppName)) { return(existingHash.ToString(APP_SUFFIX_FORMAT, CultureInfo.InvariantCulture)); } else { throw new InvalidOperationException("Hash collision between " + appName + " and " + existingAppName + ". Please rename " + appName + "."); } }
public override void Initialize(string name, NameValueCollection config) { if (String.IsNullOrEmpty(name)) { name = "Session State Provider"; } base.Initialize(name, config); session = DatabaseAccess.ForSession.DatabaseServices.SessionService; if (!s_oneTimeInited) { var sessionSection = (SessionStateSection)WebConfigurationManager.GetSection("system.web/sessionState"); session.QueryTimeout = (int)sessionSection.SqlCommandTimeout.TotalSeconds; s_singleSessionStateStore = this; appSufix = AppSuffix.Load(session); s_oneTimeInited = true; } }