Is it possible to register Interface1 below based on Interface2's custom attribute?
public interface Interface1 : Interface2
This implements Interface 2 which has a ServiceContract attribute
[ServiceContract]
public interface Interface2
and I want to do something like this so that it works out Interface1 inherits something with the ServiceContractAttribute and so registers Interface1.
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.AddFacility<TypedFactoryFacility>();
container.Register(
Classes.FromThisAssembly()
.Where(type => !type.IsInterface && type.GetInterfaces().Any(t => t.GetCustomAttributes(typeof(ServiceContractAttribute), true).Any()))
.WithServiceAllInterfaces()
.LifestylePerWcfOperation(),
However the above code doesn't seem to register inherited interfaces, but it will register Interface2 fine.
The class is as below:
public class AddressService : AnotherService, Interface1
{
public AddressService()
: base(anotherService)
{
}
}