src/Curiosity.Migrations/MigrationProviders/ScriptMigrationsProvider.cs
/// <summary>
/// Setup directory to scan for migrations
/// </summary>
/// <param name="path">Path to directory where scripts are located. Can be relative and absolute.</param>
/// <param name="prefix">Specific part of name or path. If no prefix specified provider will process only files without any prefix</param>
/// <exception cref="ArgumentNullException"></exception>
Setup directory to scan for migrations
Setup directory to scan for migrations
public ScriptMigrationsProvider FromDirectory(string path, string prefix = null)
        {
            if (String.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
            var innerPath = Path.IsPathRooted(path) 
                ? path 
                : Path.Combine(Directory.GetCurrentDirectory(), path);
            _absoluteDirectoriesPathWithPrefix[innerPath] = prefix;
            return this;
        }
public ScriptMigrationsProvider FromDirectory ( string path , string prefix = null ) { if ( String . IsNullOrEmpty ( path ) ) throw new ArgumentNullException ( nameof ( path ) ) ; var innerPath = Path . IsPathRooted ( path ) ? path : Path . Combine ( Directory . GetCurrentDirectory ( ) , path ) ; _absoluteDirectoriesPathWithPrefix [ innerPath ] = prefix ; return this ; }
Setup directory to scan for migrations
Setup directory to scan for migrations
None
path
string
Path to directory where scripts are located. Can be relative and absolute.
Path to directory where scripts are located . Can be relative and absolute .
prefix
string
Specific part of name or path. If no prefix specified provider will process only files without any prefix
Specific part of name or path . If no prefix specified provider will process only files without any prefix