Consider the following IOperationBehavior attributes:
public class OperationCredentialsAttribute : Attribute, IOperationBehavior
{
}
public class OperationProcessesAttribute : Attribute, IOperationBehavior
{
}
... and the following operation definition:
public interface IService
{
[OperationCredentials(true)]
[OperationProcesses(new[] { "CreateCustomerProcess" })]
CreateCustomerResponse CreateCustomer(CreateCustomerMessage CreateCustomerMessage);
}
I need to make sure that the OperationCredentials attribute is processed before the OperationProcesses attribute since both are using the ApplyDispatchBehavior method to register custom invokers and the execution order is important.
From my tests the decoration order is not always the order in what they are processed when the service loads.
Any ideas?