예제 #1
0
파일: Rules.cs 프로젝트: xeno3/fubumvc
        protected override DoNext applyInputs(IInputNode node, BehaviorChain chain, ConnegSettings settings)
        {
            node.Add(typeof(ModelBindingReader <>));
            node.Add(settings.FormatterFor(MimeType.Json));
            node.Add(settings.FormatterFor(MimeType.Xml));

            return(DoNext.Continue);
        }
        protected override DoNext applyInputs(IInputNode node, BehaviorChain chain, ConnegSettings settings)
        {
            node.Add(typeof(ModelBindingReader<>));
            node.Add(settings.FormatterFor(MimeType.Json));
            node.Add(settings.FormatterFor(MimeType.Xml));

            return DoNext.Continue;
        }
예제 #3
0
        protected override DoNext applyInputs(IInputNode node, BehaviorChain chain, ConnegSettings settings)
        {
            if (!chain.ResourceType().CanBeCastTo<AjaxContinuation>()) return DoNext.Continue;

            node.Add(typeof(ModelBindingReader<>));
            node.Add(settings.FormatterFor(MimeType.Json));

            return DoNext.Stop;
        }
예제 #4
0
파일: Rules.cs 프로젝트: xeno3/fubumvc
        protected override DoNext applyInputs(IInputNode node, BehaviorChain chain, ConnegSettings settings)
        {
            if (chain.AnyActionHasAttribute <AsymmetricJsonAttribute>() || chain.ResourceType().CanBeCastTo <IDictionary <string, object> >())
            {
                node.Add(typeof(ModelBindingReader <>));
                node.Add(settings.FormatterFor(MimeType.Json));

                return(DoNext.Stop);
            }

            return(DoNext.Continue);
        }
예제 #5
0
파일: Rules.cs 프로젝트: xeno3/fubumvc
        protected override DoNext applyInputs(IInputNode node, BehaviorChain chain, ConnegSettings settings)
        {
            if (!chain.ResourceType().CanBeCastTo <AjaxContinuation>())
            {
                return(DoNext.Continue);
            }

            node.Add(typeof(ModelBindingReader <>));
            node.Add(settings.FormatterFor(MimeType.Json));

            return(DoNext.Stop);
        }
        protected override DoNext applyInputs(IInputNode node, BehaviorChain chain, ConnegSettings settings)
        {
            var graph = settings.Graph ?? new ConnegGraph();
            graph.ReaderTypesFor(node.InputType()).Each(type => node.Add(Activator.CreateInstance((Type) type).As<IReader>()));

            return DoNext.Continue;
        }
예제 #7
0
        protected override DoNext applyInputs(IInputNode node, BehaviorChain chain, ConnegSettings settings)
        {
            var graph = settings.Graph ?? new ConnegGraph();

            graph.ReaderTypesFor(node.InputType()).Each(type => node.Add(Activator.CreateInstance((Type)type).As <IReader>()));

            return(DoNext.Continue);
        }
예제 #8
0
파일: Rules.cs 프로젝트: xeno3/fubumvc
        protected override DoNext applyInputs(IInputNode node, BehaviorChain chain, ConnegSettings settings)
        {
            if (chain.AnyActionHasAttribute <SymmetricJsonAttribute>())
            {
                node.Add(settings.FormatterFor(MimeType.Json));

                return(DoNext.Stop);
            }

            return(DoNext.Continue);
        }
예제 #9
0
 public void Add(IReader <T> reader)
 {
     _node.Add(reader);
 }