Click or drag to resize

AutofacHostFactory Class

Creates service host instances for WCF.
Inheritance Hierarchy

Namespace:  Autofac.Integration.Wcf
Assembly:  Autofac.Integration.Wcf (in Autofac.Integration.Wcf.dll) Version: 6.0.0+691de191498a27e1db2c331d318e19150e41288c
Syntax
public abstract class AutofacHostFactory : ServiceHostFactory

The AutofacHostFactory type exposes the following members.

Constructors
  NameDescription
Protected methodAutofacHostFactory
Initializes a new instance of the AutofacHostFactory class
Top
Properties
  NameDescription
Public propertyStatic memberContainer
Gets or sets the container or lifetime scope from which service instances will be retrieved.
Public propertyStatic memberFeatures
Gets or sets Features flags.
Public propertyStatic memberHostConfigurationAction
Gets or sets an action that can be used to programmatically configure service host instances this factory generates.
Public propertyStatic memberServiceImplementationDataProvider
Gets or sets the service implementation data strategy.
Top
Methods
  NameDescription
Protected methodCreateServiceHost(Type, Uri)
Creates a ServiceHost for a specified type of service with a specific base address.
(Inherited from ServiceHostFactory.)
Public methodCreateServiceHost(String, Uri)
Creates a ServiceHost with specific base addresses and initializes it with specified data.
(Overrides ServiceHostFactoryCreateServiceHost(String, Uri).)
Protected methodCreateSingletonServiceHost
Creates a ServiceHost for a specified type of service with a specific base address.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The Autofac service host factory allows you to change the strategy by which service implementations are resolved. You do this by setting the ServiceImplementationDataProvider with a strategy implementation.

If ServiceImplementationDataProvider is a new instance of DefaultServiceImplementationDataProvider will be used.

You may configure additional behaviors or other aspects of generated service instances by setting the HostConfigurationAction. If this value is not , generated host instances will be run through that action.

See Also