コード例 #1
0
        private void modifyNewAction(HandlerActionsSet 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");
        }
コード例 #2
0
        public void ModifyChains(HandlerActionsSet 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"));
        }
コード例 #3
0
        public void ModifyChains(HandlerActionsSet 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"));
        }
コード例 #4
0
 private void modifyNewAction(HandlerActionsSet 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");
 }