C# Class PROJECTNAMESPACE.DatabaseInstaller

Inheritance: System.Configuration.Install.Installer
显示文件 Open project: nHydrate/nHydrate Class Usage Examples

Private Properties

Property Type Description
DropDatabase bool
GetCommandLineParameters string>.Dictionary
GetSetting bool
GetSetting string
IdentifyDatabaseConnectionString bool
IsValidFileName bool
UIInstall void

Public Methods

Method Description
DatabaseInstaller ( ) : System

The default constructor

GetScript ( InstallSetup setup ) : string

Returns the upgrade script for the specified database

Install ( InstallSetup setup ) : void

Performs an install of a database

Install ( System stateSaver ) : void

Performs an install of a database

IsVersioned ( string connectionString ) : bool

Determines if the specified database has ever been versioned by the framework

NeedsUpdate ( string connectionString ) : bool

Determines if the specified database needs to be upgraded

ShowHelp ( ) : void
Uninstall ( System savedState ) : void

VersionInstalled ( string connectionString ) : string

Determines the current version of the specified database

VersionLatest ( ) : string

The database version to which this installer will upgrade a database

Private Methods

Method Description
DropDatabase ( string dbname, string masterConnectionString ) : bool
GetCommandLineParameters ( ) : string>.Dictionary
GetSetting ( string>.Dictionary commandParams, string keys, bool defaultValue ) : bool
GetSetting ( string>.Dictionary commandParams, string keys, string defaultValue ) : string
IdentifyDatabaseConnectionString ( InstallSetup setup ) : bool
IsValidFileName ( string fileName ) : bool
UIInstall ( InstallSetup setup ) : void

Method Details

DatabaseInstaller() public method

The default constructor
public DatabaseInstaller ( ) : System
return System

GetScript() public method

Returns the upgrade script for the specified database
public GetScript ( InstallSetup setup ) : string
setup InstallSetup
return string

Install() public method

Performs an install of a database
public Install ( InstallSetup setup ) : void
setup InstallSetup
return void

Install() public method

Performs an install of a database
public Install ( System stateSaver ) : void
stateSaver System
return void

IsVersioned() public method

Determines if the specified database has ever been versioned by the framework
public IsVersioned ( string connectionString ) : bool
connectionString string
return bool

NeedsUpdate() public method

Determines if the specified database needs to be upgraded
public NeedsUpdate ( string connectionString ) : bool
connectionString string
return bool

ShowHelp() public static method

public static ShowHelp ( ) : void
return void

Uninstall() public method

public Uninstall ( System savedState ) : void
savedState System
return void

VersionInstalled() public method

Determines the current version of the specified database
public VersionInstalled ( string connectionString ) : string
connectionString string
return string

VersionLatest() public method

The database version to which this installer will upgrade a database
public VersionLatest ( ) : string
return string