コード例 #1
0
 public void each_IActionBehavior_is_wrapped_with_a_nested_container_behavior()
 {
     graph.VisitRoutes(x =>
     {
         x.Actions += (r, chain) =>
         {
             factory.BuildBehavior(new ServiceArguments(), chain.UniqueId).ShouldBeOfType
             <NestedStructureMapContainerBehavior>();
         };
     });
 }
コード例 #2
0
        public void Invoke(ServiceArguments arguments, IDictionary <string, object> routeValues)
        {
            var currentChain = new CurrentChain(_chain, routeValues);

            arguments.Set(typeof(ICurrentChain), currentChain);

            if (_chain.Filters.Any(filter => filter.Filter(arguments) == DoNext.Stop))
            {
                return;
            }

            var behavior = _factory.BuildBehavior(arguments, _chain.UniqueId);

            behavior.Invoke();
        }
コード例 #3
0
        public IActionBehavior BuildBehavior(ServiceArguments arguments, Guid behaviorId)
        {
            var diagnostics = _container.Get <DiagnosticBehavior>();

            var writer = _container.Get <IOutputWriter>();
            var report = _container.Get <IDebugReport>();

            arguments.Set(typeof(IOutputWriter), new RecordingOutputWriter(report, writer));

            var behavior = _inner.BuildBehavior(arguments, behaviorId);

            diagnostics.Inner = behavior;

            return(diagnostics);
        }
コード例 #4
0
ファイル: PartialFactory.cs プロジェクト: moacap/fubumvc
        public IActionBehavior BuildBehavior(BehaviorChain chain)
        {
            var behavior = _factory.BuildBehavior(_arguments, chain.UniqueId);

            return(new FullChainSwitcher(behavior, _currentChain, chain));
        }
コード例 #5
0
ファイル: IPartialFactory.cs プロジェクト: rmueller/fubumvc
        public IActionBehavior BuildPartial(Type inputType)
        {
            Guid id = _graph.IdForType(inputType);

            return(_factory.BuildBehavior(_arguments, id));
        }