Click or drag to resize

AutofacHostFactoryCreateServiceHost Method (String, Uri)

Creates a ServiceHost with specific base addresses and initializes it with specified data.

Namespace:  Autofac.Integration.Wcf
Assembly:  Autofac.Integration.Wcf (in Autofac.Integration.Wcf.dll) Version: 6.0.0+691de191498a27e1db2c331d318e19150e41288c
Syntax
public override ServiceHostBase CreateServiceHost(
	string constructorString,
	Uri[] baseAddresses
)

Parameters

constructorString
Type: SystemString
The initialization data passed to the ServiceHostBase instance being constructed by the factory.
baseAddresses
Type: SystemUri
The Array of type Uri that contains the base addresses for the service hosted.

Return Value

Type: ServiceHostBase
A ServiceHost with specific base addresses.
Exceptions
ExceptionCondition
ArgumentNullException Thrown if constructorString or baseAddresses is .
ArgumentException Thrown if constructorString is empty.
InvalidOperationException Thrown if the Container is .
Remarks

If HostConfigurationAction is not , the new service host instance is run through the configuration action prior to being returned. This allows you to programmatically configure behaviors or other aspects of the host.

See Also