C# Class ScrewTurn.Wiki.Plugins.SqlCommon.SqlStorageProviderBase

Implements a base class for a SQL storage provider.
Inheritance: SqlClassBase
Show file Open project: mono/ScrewTurnWiki

Protected Properties

Property Type Description
connString string
host IHostV30

Public Methods

Method Description
Init ( IHostV30 host, string config ) : void

Initializes the Storage Provider.

Shutdown ( ) : void

Method invoked on shutdown.

This method might not be invoked in some cases.

Protected Methods

Method Description
CreateOrUpdateDatabaseIfNecessary ( ) : void

Creates or updates the database schema if necessary.

GetCommandBuilder ( ) : ICommandBuilder

Gets a new command builder object.

LogException ( Exception ex ) : void

Logs an exception.

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.

Method Details

CreateOrUpdateDatabaseIfNecessary() protected abstract method

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

GetCommandBuilder() protected abstract method

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

Init() public method

Initializes the Storage Provider.
If host or config are null. If config is not valid or is incorrect.
public Init ( IHostV30 host, string config ) : void
host IHostV30 The Host of the Component.
config string The Configuration data, if any.
return void

LogException() protected method

Logs an exception.
protected LogException ( Exception ex ) : void
ex System.Exception The exception.
return void

Shutdown() public method

Method invoked on shutdown.
This method might not be invoked in some cases.
public Shutdown ( ) : void
return void

TryLoadSettingsStorageProviderConfiguration() protected abstract method

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

TryLoadV2Configuration() protected abstract method

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

ValidateConnectionString() protected abstract method

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

Property Details

connString protected property

The connection string.
protected string connString
return string

host protected property

The host.
protected IHostV30 host
return IHostV30