ModularStartup
Execute "no touch" IStartup, IConfigureServices and IConfigureApp Startup configuration classes.
The "no touch" Startup configuration classes are executed in the following order:
Configure Services: Priority < 0:
IConfigureServices.Configure(services), IStartup.ConfigureServices(services)
this.ConfigureServices(services)
Priority >= 0: (no [Priority] == 0)
- IConfigureServices.Configure(services), IStartup.ConfigureServices(services)
Configure App: Priority < 0:
IConfigureApp.Configure(app), IStartup.Configure(app)
this.Configure(app)
Priority >= 0: (no [Priority] == 0)
- IConfigureApp.Configure(app), IStartup.Configure(app)
Assembly: ServiceStack.dll
View Source
Declaration
public abstract class ModularStartup : IStartup
Properties
Instance
View Source
Declaration
public static ModularStartup Instance { get; protected set; }
IgnoreTypes
Which Startup Types not to load
View Source
Declaration
public List<Type> IgnoreTypes { get; set; }
ScanAssemblies
View Source
Declaration
public List<Assembly>? ScanAssemblies { get; }
Configuration
View Source
Declaration
public IConfiguration? Configuration { get; set; }
TypeResolver
View Source
Declaration
public Func<IEnumerable<Type>> TypeResolver { get; }
LoadedConfigurations
View Source
Declaration
public List<object> LoadedConfigurations { get; set; }
Methods
CreateStartupInstance(Type)
View Source
Declaration
public object CreateStartupInstance(Type type)
Returns
System.Object
Parameters
Type | Name |
---|---|
Type | type |
LoadType(Type)
Whether to load the Startup Type or not, allows all Startup Types not in IgnoreTypes by default
View Source
Declaration
public virtual bool LoadType(Type startupType)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
Type | startupType |
GetPriorityInstances()
View Source
Declaration
public List<Tuple<object, int>> GetPriorityInstances()
Returns
List<Tuple<System.Object,System.Int32>>
ConfigureServices(IServiceCollection)
View Source
Declaration
public IServiceProvider ConfigureServices(IServiceCollection services)
Returns
IServiceProvider
Parameters
Type | Name |
---|---|
IServiceCollection | services |
Configure(IApplicationBuilder)
View Source
Declaration
public void Configure(IApplicationBuilder app)
Parameters
Type | Name |
---|---|
IApplicationBuilder | app |
Create<TStartup>()
View Source
Declaration
public static Type Create<TStartup>()
Returns
Type
Type Parameters
TStartup