Thetype exposes the following members.
Gets the metadata class type.
When implemented in a derived class, gets a unique identifier for this Attribute.(Inherited from Attribute.)
Returns a value that indicates whether this instance is equal to a specified object.(Inherited from Attribute.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Returns the hash code for this instance.(Inherited from Attribute.)
Gets the Type of the current instance.(Inherited from Object.)
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.(Inherited from Attribute.)
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.(Inherited from Attribute.)
Creates a shallow copy of the current Object.(Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
Maps a set of names to a corresponding set of dispatch identifiers.(Inherited from Attribute.)
Retrieves the type information for an object, which can be used to get the type information for an interface.(Inherited from Attribute.)
Retrieves the number of type information interfaces that an object provides (either 0 or 1).(Inherited from Attribute.)
Provides access to properties and methods exposed by an object.(Inherited from Attribute.)
When hosting a service in a multitenant environment using AutofacHostFactory and the dynamic proxy generation that occurs therein, you can't really mark your "service implementation class" with metadata attributes like the ServiceBehaviorAttribute. Also, since many of these attributes require you to mark a class rather than the service interface, there's no way to otherwise specify them.
This attribute works similar to the System.ComponentModel.DataAnnotations.MetadataTypeAttribute and allows you to mark a service interface such that the generated dynamic proxy class will use a "metadata buddy class" to retrieve various attributes that should be applied during generation.
Mark your service interface with one of these attributes, then create an empty class with the ServiceBehaviorAttribute (or whatever) associated with it. The dynamic proxy generation will copy these attributes, thus allowing you to still make use of service metadata info.
This is particularly handy when choosing to specify a service name. Since WCF usually infers the service name (which is also the name of the service element in configuration that it uses to set up the service host) from the type of the implementation, a dynamic proxy implementation results in service names like Castle.Proxies.IMyServiceProxy_1. To manually specify the name, you use the Name property, which can be associated with a service metadata buddy class.