C# Class ScrewTurn.Wiki.Plugins.SqlServer.SqlServerSettingsStorageProvider

Implements a SQL Server-based settings storage provider.
Inheritance: ScrewTurn.Wiki.Plugins.SqlCommon.SqlSettingsStorageProviderBase
Show file Open project: mono/ScrewTurnWiki

Protected Methods

Method Description
CreateOrUpdateDatabaseIfNecessary ( ) : void

Creates or updates the database schema if necessary.

GetCommandBuilder ( ) : ICommandBuilder

Gets a new command builder object.

TryLoadSettingsStorageProviderConfiguration ( ) : string

Tries to load the configuration of the corresponding settings storage provider.

TryLoadV2Configuration ( ) : string

Tries to load the configuration from a corresponding v2 provider.

ValidateConnectionString ( string connString ) : void

Validates a connection string.

If the connection string is invalid, the method throws T:InvalidConfigurationException.

Private Methods

Method Description
CreateStandardSchema ( ) : void

Creates the standard database schema.

GetCommand ( string connString ) : SqlCommand

Gets a new command with an open connection.

SchemaExists ( ) : bool

Detects whether the database schema exists.

SchemaNeedsUpdate ( ) : bool

Detects whether the database schema needs to be updated.

Method Details

CreateOrUpdateDatabaseIfNecessary() protected method

Creates or updates the database schema if necessary.
protected CreateOrUpdateDatabaseIfNecessary ( ) : void
return void

GetCommandBuilder() protected method

Gets a new command builder object.
protected GetCommandBuilder ( ) : ICommandBuilder
return ICommandBuilder

TryLoadSettingsStorageProviderConfiguration() protected method

Tries to load the configuration of the corresponding settings storage provider.
protected TryLoadSettingsStorageProviderConfiguration ( ) : string
return string

TryLoadV2Configuration() protected method

Tries to load the configuration from a corresponding v2 provider.
protected TryLoadV2Configuration ( ) : string
return string

ValidateConnectionString() protected method

Validates a connection string.
If the connection string is invalid, the method throws T:InvalidConfigurationException.
protected ValidateConnectionString ( string connString ) : void
connString string The connection string to validate.
return void