C# Класс MvcInstaller.InstallWizard

This is the primary class that handles installing your web application.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
InstallWizard ( ) : System
Run ( InstallerConfig config ) : void

Run the process to install the database and users.

UpdateConfig ( InstallerConfig config ) : void

Приватные методы

Метод Описание
AddUsers ( InstallerConfig config ) : void

Add users and roles inside a transaction in case there's an exception, we can simply click the "Install" button again.

CreateMembership ( InstallerConfig config ) : void

Create the Membership database and set the roles and users.

ExecuteStatements ( string tableStatements, InstallerConfig config ) : void

This will execute the sql statements.

Fix ( ) : void

Fix an anomaly in the WebConfigurationManager Save method that encodes """ to "".

GetScriptStatements ( string p ) : string[]

This gets individual script statements from the sql script.

GetScriptStatements ( string p, StringSplitOptions options ) : string[]
ProviderCheck ( ) : void

Check that the correct providers are referenced for the Membership system. This version of MvcInstaller does NOT use the new SimpleMembershipProviders. It still uses the System.Web.Providers namespace.

RemoveAppInstalledKey ( ) : void

Remove the AppInstalled key from the appsettings section.

ResetDb ( InstallerConfig config ) : void

This is used before the System.Web.Management.SqlServices.Uninstall class to remove any constraints that you may have put on your table and the aspnet Db tables. You create the scripts and drop them into the App_Data\Reset folder.

RunScripts ( InstallerConfig config ) : void

Run the sql scripts in the location set in the installer.config file.

UpdateWebConfig ( InstallerConfig config ) : void

Write the new connection string to the web.config file and update the membership sections if necessary.

Описание методов

InstallWizard() публичный Метод

public InstallWizard ( ) : System
Результат System

Run() публичный статический Метод

Run the process to install the database and users.
public static Run ( InstallerConfig config ) : void
config MvcInstaller.Settings.InstallerConfig
Результат void

UpdateConfig() публичный статический Метод

public static UpdateConfig ( InstallerConfig config ) : void
config MvcInstaller.Settings.InstallerConfig
Результат void