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; }
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) { 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); }
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; }
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); }
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); }
public void Add(IReader <T> reader) { _node.Add(reader); }