Class ApplicationHostBuilder<TApplicationHostBuilder>
Provides the abstract builder class for an ApplicationHost.
Inheritance
System.Object
ApplicationHostBuilder<TApplicationHostBuilder>
Namespace: Copper.Hosting
Assembly: Copper.Hosting.dll
Syntax
public abstract class ApplicationHostBuilder<TApplicationHostBuilder> : ComponentBuilder<ApplicationHost, TApplicationHostBuilder> where TApplicationHostBuilder : ApplicationHostBuilder<TApplicationHostBuilder>
Type Parameters
Name | Description |
---|---|
TApplicationHostBuilder |
Constructors
View SourceApplicationHostBuilder()
Initializes a new instance of the ApplicationHostBuilder class.
Declaration
protected ApplicationHostBuilder()
Methods
View SourceAddService(String, String)
Adds a named instance of the given service type to the application host.
Declaration
public TApplicationHostBuilder AddService(string serviceName, string serviceTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | serviceName | The service name. |
System.String | serviceTypeName | The service type name. |
Returns
Type | Description |
---|---|
TApplicationHostBuilder | The same instance of ApplicationHostBuilder<TApplicationHostBuilder> for chaining. |
AddServiceType<TServiceHostBuilder>(String, Func<ServiceHostBuilder<TServiceHostBuilder>>)
Adds a named service type to the application host.
Declaration
public TApplicationHostBuilder AddServiceType<TServiceHostBuilder>(string serviceTypeName, Func<ServiceHostBuilder<TServiceHostBuilder>> configureDelegate)
where TServiceHostBuilder : ServiceHostBuilder<TServiceHostBuilder>
Parameters
Type | Name | Description |
---|---|---|
System.String | serviceTypeName | The service type name. |
System.Func<ServiceHostBuilder<TServiceHostBuilder>> | configureDelegate | A factory method to create service host objects. |
Returns
Type | Description |
---|---|
TApplicationHostBuilder | The same instance of ApplicationHostBuilder<TApplicationHostBuilder> for chaining. |
Type Parameters
Name | Description |
---|---|
TServiceHostBuilder | The service host builder type. |