Exemple #1
0
 public AjaxValidationFailureHandler(IAjaxContinuationResolver resolver, IOutputWriter output, IFubuRequest request, ValidationSettings settings)
 {
     _resolver = resolver;
     _output   = output;
     _request  = request;
     _settings = settings;
 }
 public AjaxValidationFailureHandler(IAjaxContinuationResolver resolver, IOutputWriter output, IFubuRequest request, ValidationSettings settings)
 {
     _resolver = resolver;
     _output = output;
     _request = request;
     _settings = settings;
 }
        public static void ApplyValidation(ActionCall call, ValidationSettings settings)
        {
            BehaviorNode node;

            if (call.ResourceType().CanBeCastTo <AjaxContinuation>())
            {
                node = new AjaxValidationNode(call);
            }
            else
            {
                var builder = typeof(LoFiValidationNodeBuilder <>).CloseAndBuildAs <IValidationNodeBuilder>(call.InputType());
                node = builder.BuildNode();
            }

            call.AddBefore(node);
            settings.As <IChainModification>().Modify(call.ParentChain());
        }