Looking for good way to do selection via inheritance chain with Windsor for 
the following scenario:

IExceptionHandler<T> : where T : Exception

IException<Exception> //default IMPL

IExceptionHandler<SqlException>  IMPL for SQL errors.

IExceptionHandler<OracleException> IMPL for Oracle errors

.
.
.
etc


So ideally you would have a typed factory interface that looks like this:

public interface IExceptionHandlerFactory : where T : Exception
{
   IExceptionHandler<T> GetHandler(Exception ex);
}

The idea being that the most specific exception handler (based upon 
Exception inheritance chain) is selected for creation based upon the 
current exception being passed in.

Example, passing a SQLException into the factory would return 
IExceptionHandler<SqlException> but passing a ArgumentNullException into 
the factory would return IExceptionHandler<Exception>.

Is this possible using Windsor?

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to