C# 클래스 StandardExtensions, DbUp

Configuration extensions for the standard stuff.
파일 보기 프로젝트 열기: DbUp/DbUp 1 사용 예제들

공개 메소드들

메소드 설명
JournalTo ( this builder, IJournal journal ) : DbUp.Builder.UpgradeEngineBuilder

Uses a custom journal for recording which scripts were executed.

LogScriptOutput ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Logs to the console using pretty colours.

LogTo ( this builder, IUpgradeLog log ) : DbUp.Builder.UpgradeEngineBuilder

Logs to a custom logger.

LogToConsole ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Logs to the console using pretty colours.

LogToSqlContext ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Logs to SqlContext.Pipe, for use with "context connection=true".

LogToTrace ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Logs to System.Diagnostics.Trace.

WithExecutionTimeout ( this builder, TimeSpan timeout ) : DbUp.Builder.UpgradeEngineBuilder

Allows you to set the execution timeout for scripts.

Setting the timeout parameter to null will use the default timeout of the underlying provider.

WithPreprocessor ( this builder, IScriptPreprocessor preprocessor ) : DbUp.Builder.UpgradeEngineBuilder

Adds a preprocessor that can replace portions of a script.

WithScript ( this builder, DbUp.Engine.SqlScript script ) : DbUp.Builder.UpgradeEngineBuilder

Adds a single static script to the upgrader.

WithScript ( this builder, string name, string contents ) : DbUp.Builder.UpgradeEngineBuilder

Adds a single static script to the upgrader.

WithScripts ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Adds a static set of scripts to the upgrader.

WithScripts ( this builder, IEnumerable scripts ) : DbUp.Builder.UpgradeEngineBuilder

Adds a static set of scripts to the upgrader.

WithScripts ( this builder, IScriptProvider scriptProvider ) : DbUp.Builder.UpgradeEngineBuilder

Adds a custom script provider to the upgrader.

WithScriptsAndCodeEmbeddedInAssembly ( this builder, Assembly assembly ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts found as embedded resources in the given assembly, or classes which inherit from IScript, with a custom filter (you'll need to exclude non- .SQL files yourself).

WithScriptsAndCodeEmbeddedInAssembly ( this builder, Assembly assembly, bool>.Func filter ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts found as embedded resources in the given assembly, or classes which inherit from IScript, with a custom filter (you'll need to exclude non- .SQL files yourself).

WithScriptsEmbeddedInAssemblies ( this builder, Assembly assemblies ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts ending in '.sql' found as embedded resources in the given assemblies, using the default Encoding.

WithScriptsEmbeddedInAssemblies ( this builder, Assembly assemblies, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts ending in '.sql' found as embedded resources in the given assemblies, using the specified Encoding.

WithScriptsEmbeddedInAssemblies ( this builder, Assembly assemblies, bool>.Func filter ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts matching the specified filter found as embedded resources in the given assemblies, using the default Encoding.

WithScriptsEmbeddedInAssemblies ( this builder, Assembly assemblies, bool>.Func filter, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts found as embedded resources in the given assemblies, with a custom filter (you'll need to exclude non- .SQL files yourself).

WithScriptsEmbeddedInAssembly ( this builder, Assembly assembly ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts found as embedded resources in the given assembly.

WithScriptsEmbeddedInAssembly ( this builder, Assembly assembly, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts found as embedded resources in the given assembly, with custom encoding.

WithScriptsEmbeddedInAssembly ( this builder, Assembly assembly, bool>.Func filter ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts found as embedded resources in the given assembly, with a custom filter (you'll need to exclude non- .SQL files yourself).

WithScriptsEmbeddedInAssembly ( this builder, Assembly assembly, bool>.Func filter, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts found as embedded resources in the given assembly, with custom encoding and with a custom filter (you'll need to exclude non- .SQL files yourself).

WithScriptsFromFileSystem ( this builder, string path ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts from a folder on the file system.

WithScriptsFromFileSystem ( this builder, string path, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts from a folder on the file system, with custom encoding.

WithScriptsFromFileSystem ( this builder, string path, FileSystemScriptOptions options ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts from a folder on the file system, with custom options (Encoding, filter, etc.).

WithScriptsFromFileSystem ( this builder, string path, bool>.Func filter ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts from a folder on the file system, with a custom filter.

WithScriptsFromFileSystem ( this builder, string path, bool>.Func filter, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder

Adds all scripts from a folder on the file system, with a custom filter and custom encoding.

WithTransaction ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Run DbUp in a single transaction

WithTransactionPerScript ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Run each script in it's own transaction

WithVariable ( this builder, string variableName, string value ) : DbUp.Builder.UpgradeEngineBuilder

Adds a single variable that will be replaced before scripts are executed.

WithVariables ( this builder, string>.IDictionary variables ) : DbUp.Builder.UpgradeEngineBuilder

Adds a set of variables that will be replaced before scripts are executed.

WithVariablesDisabled ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Sets a configuration flag which will cause the engine to skip variable expansion.

WithVariablesEnabled ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Sets a configuration flag which will cause the engine to perform variable expansion.

WithoutTransaction ( this builder ) : DbUp.Builder.UpgradeEngineBuilder

Run creates a new connection for each script, without a transaction

메소드 상세

JournalTo() 공개 정적인 메소드

Uses a custom journal for recording which scripts were executed.
public static JournalTo ( this builder, IJournal journal ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
journal IJournal The custom journal.
리턴 DbUp.Builder.UpgradeEngineBuilder

LogScriptOutput() 공개 정적인 메소드

Logs to the console using pretty colours.
public static LogScriptOutput ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
리턴 DbUp.Builder.UpgradeEngineBuilder

LogTo() 공개 정적인 메소드

Logs to a custom logger.
public static LogTo ( this builder, IUpgradeLog log ) : DbUp.Builder.UpgradeEngineBuilder
builder this
log IUpgradeLog The logger.
리턴 DbUp.Builder.UpgradeEngineBuilder

LogToConsole() 공개 정적인 메소드

Logs to the console using pretty colours.
public static LogToConsole ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
리턴 DbUp.Builder.UpgradeEngineBuilder

LogToSqlContext() 공개 정적인 메소드

Logs to SqlContext.Pipe, for use with "context connection=true".
public static LogToSqlContext ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
리턴 DbUp.Builder.UpgradeEngineBuilder

LogToTrace() 공개 정적인 메소드

Logs to System.Diagnostics.Trace.
public static LogToTrace ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithExecutionTimeout() 공개 정적인 메소드

Allows you to set the execution timeout for scripts.
Setting the timeout parameter to null will use the default timeout of the underlying provider.
The timeout value is less than zero or greater than 2,147,483,647 seconds.
public static WithExecutionTimeout ( this builder, TimeSpan timeout ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
timeout TimeSpan A TimeSpan value containing the timeout value or null.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithPreprocessor() 공개 정적인 메소드

Adds a preprocessor that can replace portions of a script.
public static WithPreprocessor ( this builder, IScriptPreprocessor preprocessor ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
preprocessor IScriptPreprocessor The preprocessor.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScript() 공개 정적인 메소드

Adds a single static script to the upgrader.
public static WithScript ( this builder, DbUp.Engine.SqlScript script ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
script DbUp.Engine.SqlScript The script.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScript() 공개 정적인 메소드

Adds a single static script to the upgrader.
public static WithScript ( this builder, string name, string contents ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
name string The name of the script. This should never change once executed.
contents string The script body.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScripts() 공개 정적인 메소드

Adds a static set of scripts to the upgrader.
public static WithScripts ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScripts() 공개 정적인 메소드

Adds a static set of scripts to the upgrader.
public static WithScripts ( this builder, IEnumerable scripts ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
scripts IEnumerable The scripts.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScripts() 공개 정적인 메소드

Adds a custom script provider to the upgrader.
public static WithScripts ( this builder, IScriptProvider scriptProvider ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
scriptProvider IScriptProvider The script provider.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsAndCodeEmbeddedInAssembly() 공개 정적인 메소드

Adds all scripts found as embedded resources in the given assembly, or classes which inherit from IScript, with a custom filter (you'll need to exclude non- .SQL files yourself).
public static WithScriptsAndCodeEmbeddedInAssembly ( this builder, Assembly assembly ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assembly Assembly The assembly.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsAndCodeEmbeddedInAssembly() 공개 정적인 메소드

Adds all scripts found as embedded resources in the given assembly, or classes which inherit from IScript, with a custom filter (you'll need to exclude non- .SQL files yourself).
public static WithScriptsAndCodeEmbeddedInAssembly ( this builder, Assembly assembly, bool>.Func filter ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assembly Assembly The assembly.
filter bool>.Func The Sql Script filter (only affects embdeeded scripts, does not filter IScript files). Don't forget to ignore any non- .SQL files.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsEmbeddedInAssemblies() 공개 정적인 메소드

Adds all scripts ending in '.sql' found as embedded resources in the given assemblies, using the default Encoding.
public static WithScriptsEmbeddedInAssemblies ( this builder, Assembly assemblies ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assemblies Assembly The assemblies.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsEmbeddedInAssemblies() 공개 정적인 메소드

Adds all scripts ending in '.sql' found as embedded resources in the given assemblies, using the specified Encoding.
public static WithScriptsEmbeddedInAssemblies ( this builder, Assembly assemblies, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assemblies Assembly The assemblies.
encoding Encoding The encoding.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsEmbeddedInAssemblies() 공개 정적인 메소드

Adds all scripts matching the specified filter found as embedded resources in the given assemblies, using the default Encoding.
public static WithScriptsEmbeddedInAssemblies ( this builder, Assembly assemblies, bool>.Func filter ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assemblies Assembly The assemblies.
filter bool>.Func The filter. Don't forget to ignore any non- .SQL files.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsEmbeddedInAssemblies() 공개 정적인 메소드

Adds all scripts found as embedded resources in the given assemblies, with a custom filter (you'll need to exclude non- .SQL files yourself).
public static WithScriptsEmbeddedInAssemblies ( this builder, Assembly assemblies, bool>.Func filter, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assemblies Assembly The assemblies.
filter bool>.Func The filter. Don't forget to ignore any non- .SQL files.
encoding Encoding The encoding.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsEmbeddedInAssembly() 공개 정적인 메소드

Adds all scripts found as embedded resources in the given assembly.
public static WithScriptsEmbeddedInAssembly ( this builder, Assembly assembly ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assembly Assembly The assembly.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsEmbeddedInAssembly() 공개 정적인 메소드

Adds all scripts found as embedded resources in the given assembly, with custom encoding.
public static WithScriptsEmbeddedInAssembly ( this builder, Assembly assembly, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assembly Assembly The assembly.
encoding Encoding The encoding.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsEmbeddedInAssembly() 공개 정적인 메소드

Adds all scripts found as embedded resources in the given assembly, with a custom filter (you'll need to exclude non- .SQL files yourself).
public static WithScriptsEmbeddedInAssembly ( this builder, Assembly assembly, bool>.Func filter ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assembly Assembly The assembly.
filter bool>.Func The filter. Don't forget to ignore any non- .SQL files.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsEmbeddedInAssembly() 공개 정적인 메소드

Adds all scripts found as embedded resources in the given assembly, with custom encoding and with a custom filter (you'll need to exclude non- .SQL files yourself).
public static WithScriptsEmbeddedInAssembly ( this builder, Assembly assembly, bool>.Func filter, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
assembly Assembly The assembly.
filter bool>.Func The filter. Don't forget to ignore any non- .SQL files.
encoding Encoding The encoding.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsFromFileSystem() 공개 정적인 메소드

Adds all scripts from a folder on the file system.
public static WithScriptsFromFileSystem ( this builder, string path ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
path string The directory path.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsFromFileSystem() 공개 정적인 메소드

Adds all scripts from a folder on the file system, with custom encoding.
public static WithScriptsFromFileSystem ( this builder, string path, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
path string The directory path.
encoding Encoding The encoding.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsFromFileSystem() 공개 정적인 메소드

Adds all scripts from a folder on the file system, with custom options (Encoding, filter, etc.).
public static WithScriptsFromFileSystem ( this builder, string path, FileSystemScriptOptions options ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
path string The directory path.
options FileSystemScriptOptions Options for the file System Provider
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsFromFileSystem() 공개 정적인 메소드

Adds all scripts from a folder on the file system, with a custom filter.
public static WithScriptsFromFileSystem ( this builder, string path, bool>.Func filter ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
path string The directory path.
filter bool>.Func The filter. Use the static class to get some pre-defined filters.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithScriptsFromFileSystem() 공개 정적인 메소드

Adds all scripts from a folder on the file system, with a custom filter and custom encoding.
public static WithScriptsFromFileSystem ( this builder, string path, bool>.Func filter, Encoding encoding ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
path string The directory path.
filter bool>.Func The filter. Use the static class to get some pre-defined filters.
encoding Encoding The encoding.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithTransaction() 공개 정적인 메소드

Run DbUp in a single transaction
public static WithTransaction ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this
리턴 DbUp.Builder.UpgradeEngineBuilder

WithTransactionPerScript() 공개 정적인 메소드

Run each script in it's own transaction
public static WithTransactionPerScript ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this
리턴 DbUp.Builder.UpgradeEngineBuilder

WithVariable() 공개 정적인 메소드

Adds a single variable that will be replaced before scripts are executed.
public static WithVariable ( this builder, string variableName, string value ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
variableName string The name of the variable.
value string The value to be substituted.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithVariables() 공개 정적인 메소드

Adds a set of variables that will be replaced before scripts are executed.
public static WithVariables ( this builder, string>.IDictionary variables ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
variables string>.IDictionary The variables.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithVariablesDisabled() 공개 정적인 메소드

Sets a configuration flag which will cause the engine to skip variable expansion.
public static WithVariablesDisabled ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithVariablesEnabled() 공개 정적인 메소드

Sets a configuration flag which will cause the engine to perform variable expansion.
public static WithVariablesEnabled ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this The builder.
리턴 DbUp.Builder.UpgradeEngineBuilder

WithoutTransaction() 공개 정적인 메소드

Run creates a new connection for each script, without a transaction
public static WithoutTransaction ( this builder ) : DbUp.Builder.UpgradeEngineBuilder
builder this
리턴 DbUp.Builder.UpgradeEngineBuilder