src/Curiosity.Migrations/MigrationProviders/CodeMigrationsProvider.cs
/// <summary>
/// Set up assembly for scanning migrations with specified type
/// </summary>
/// <param name="assembly">Assembly to scan</param>
/// <exception cref="ArgumentNullException"></exception>
Set up assembly for scanning migrations with specified type
Set up assembly for scanning migrations with specified type
public CodeMigrationsProvider FromAssembly<T>(Assembly assembly)
        {
            if (assembly == null) throw new ArgumentNullException(nameof(assembly));
            var migrationType = typeof(T);
            if (!_typedAssemblies.ContainsKey(migrationType))
            {
                _typedAssemblies[migrationType] = new List<Assembly>(1);
            }
            _typedAssemblies[migrationType].Add(assembly);
            return this;
        }
public CodeMigrationsProvider FromAssembly < T > ( Assembly assembly ) { if ( assembly == null ) throw new ArgumentNullException ( nameof ( assembly ) ) ; var migrationType = typeof ( T ) ; if ( ! _typedAssemblies . ContainsKey ( migrationType ) ) { _typedAssemblies [ migrationType ] = new List < Assembly > ( 1 ) ; } _typedAssemblies [ migrationType ] . Add ( assembly ) ; return this ; }
Set up assembly for scanning migrations with specified type
Set up assembly for scanning migrations with specified type
None
assembly
Assembly
Assembly to scan
Assembly to scan