Hi

For a certain dynamic action, I need to provide a generic repository
but as dynamicactionProvider isn't resolved from the container, how
can I inject this dependecy? I'm using a similar approache Hammet
described months ago:

public class CerberusCrudProvider<T> : IDynamicActionProvider where
T : EntityBase
    {
        public void IncludeActions(IEngineContext engineContext,
IController controller, IControllerContext controllerContext)
        {
            Type controllerType = controller.GetType();

            object[] atts =
controllerType.GetCustomAttributes(typeof(CrudAttribute), false);

            if (atts.Length == 0)
            {
                throw new Exception("CrudAttribute not used on " +
controllerType.Name);
            }

            CrudAttribute crudAtt = (CrudAttribute)atts[0];

            Type arType = crudAtt.ActiveRecordType;
            String prefix = arType.Name.ToLower();

            //other dynamic actions here
            controllerContext.DynamicActions["ListAll"] = new
ListAllAction<T>(repository); <- I need this repository. Where can I
get it????

        }
    }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to