Ejemplo n.º 1
0
        private void modifyNewAction(ActionCallSet actions)
        {
            var newAction = actions.ByName("New");

            if (newAction == null)
            {
                return;
            }
            // Set the url categorization and the route
            var chain = newAction.ParentChain();

            chain.UrlCategory.Creates.Add(_entityType);
            chain.Route = new RouteDefinition(_routeName + "/new");
        }
Ejemplo n.º 2
0
        public void ModifyChains(ActionCallSet actions, BehaviorGraph graph)
        {
            // Attach the creation handlers
            actions.ForOutput(x => x.Closes(typeof(CreationRequest<>))).Each(addCreatorCall);

            // Attach the creation permissions
            actions.StartingWith("Create").Each(addCreationPermission);
            actions.StartingWith("New").Each(addCreationPermission);

            // Mark the New method as the 'new' url for that entity type
            modifyNewAction(actions);

            // Flesh out the behavior chains for "New" chains
            actions.StartingWith("New").Each(addNewEntityPipeline);

            // add the Find and EditProperty endpoints
            addEndpointsFor(_entityType, graph);

            // Attach more behaviors and security for the Edit endpoints
            modifyEditAction(actions.ByName("Edit"));
        }
Ejemplo n.º 3
0
        public void ModifyChains(ActionCallSet actions, BehaviorGraph graph)
        {
            // Attach the creation handlers
            actions.ForOutput(x => x.Closes(typeof(CreationRequest <>))).Each(addCreatorCall);

            // Attach the creation permissions
            actions.StartingWith("Create").Each(addCreationPermission);
            actions.StartingWith("New").Each(addCreationPermission);

            // Mark the New method as the 'new' url for that entity type
            modifyNewAction(actions);

            // Flesh out the behavior chains for "New" chains
            actions.StartingWith("New").Each(addNewEntityPipeline);

            // add the Find and EditProperty endpoints
            addEndpointsFor(_entityType, graph);

            // Attach more behaviors and security for the Edit endpoints
            modifyEditAction(actions.ByName("Edit"));
        }
Ejemplo n.º 4
0
 private void modifyNewAction(ActionCallSet actions)
 {
     var newAction = actions.ByName("New");
     if (newAction == null) return;
     // Set the url categorization and the route
     var chain = newAction.ParentChain();
     chain.UrlCategory.Creates.Add(_entityType);
     chain.Route = new RouteDefinition(_routeName + "/new");
 }