Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultNancyModuleBuilder"/> class.
 /// </summary>
 /// <param name="viewFactory">The <see cref="IViewFactory"/> instance that should be assigned to the module.</param>
 /// <param name="responseFormatterFactory">An <see cref="IResponseFormatterFactory"/> instance that should be used to create a response formatter for the module.</param>
 /// <param name="modelBinderLocator">A <see cref="IModelBinderLocator"/> instance that should be assigned to the module.</param>
 /// <param name="validatorLocator">A <see cref="IModelValidatorLocator"/> instance that should be assigned to the module.</param>
 public DefaultNancyModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory, IModelBinderLocator modelBinderLocator, IModelValidatorLocator validatorLocator)
 {
     this.viewFactory = viewFactory;
     this.responseFormatterFactory = responseFormatterFactory;
     this.modelBinderLocator = modelBinderLocator;
     this.validatorLocator = validatorLocator;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultNancyModuleBuilder"/> class.
 /// </summary>
 /// <param name="viewFactory">The <see cref="IViewFactory"/> instance that should be assigned to the module.</param>
 /// <param name="responseFormatterFactory">An <see cref="IResponseFormatterFactory"/> instance that should be used to create a response formatter for the module.</param>
 /// <param name="modelBinderLocator">A <see cref="IModelBinderLocator"/> instance that should be assigned to the module.</param>
 /// <param name="validatorLocator">A <see cref="IModelValidatorLocator"/> instance that should be assigned to the module.</param>
 public DefaultModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory, IModelBinderLocator modelBinderLocator, IModelValidatorLocator validatorLocator)
 {
     _viewFactory = viewFactory;
     _responseFormatterFactory = responseFormatterFactory;
     _modelBinderLocator = modelBinderLocator;
     _validatorLocator = validatorLocator;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultNancyModuleBuilder"/> class.
 /// </summary>
 /// <param name="viewFactory">The <see cref="IViewFactory"/> instance that should be assigned to the module.</param>
 /// <param name="responseFormatterFactory">An <see cref="IResponseFormatterFactory"/> instance that should be used to create a response formatter for the module.</param>
 /// <param name="modelBinderLocator">A <see cref="IModelBinderLocator"/> instance that should be assigned to the module.</param>
 /// <param name="validatorLocator">A <see cref="IModelValidatorLocator"/> instance that should be assigned to the module.</param>
 public DefaultNancyModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory, IModelBinderLocator modelBinderLocator, IModelValidatorLocator validatorLocator)
 {
     this.viewFactory = viewFactory;
     this.responseFormatterFactory = responseFormatterFactory;
     this.modelBinderLocator       = modelBinderLocator;
     this.validatorLocator         = validatorLocator;
 }
 public RavenAwareModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory,
                                IModelBinderLocator modelBinderLocator,
                                IRavenSessionProvider ravenSessionProvider,
      IModelValidatorLocator validatorLocator)
 {
     this.viewFactory = viewFactory;
     this.responseFormatterFactory = responseFormatterFactory;
     this.modelBinderLocator = modelBinderLocator;
     this.validatorLocator = validatorLocator;
     _ravenSessionProvider = ravenSessionProvider;
 }
        public DefaultNancyModuleBuilderFixture()
        {
            this.module = new FakeNancyModule();

            this.responseFormatterFactory =
                A.Fake<IResponseFormatterFactory>();

            this.viewFactory = A.Fake<IViewFactory>();
            this.modelBinderLocator = A.Fake<IModelBinderLocator>();
            this.builder = new DefaultNancyModuleBuilder(this.viewFactory, this.responseFormatterFactory, this.modelBinderLocator);
        }
Ejemplo n.º 6
0
 public RavenAwareModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory,
                                IModelBinderLocator modelBinderLocator,
                                IRavenSessionProvider ravenSessionProvider,
                                IModelValidatorLocator validatorLocator)
 {
     this.viewFactory = viewFactory;
     this.responseFormatterFactory = responseFormatterFactory;
     this.modelBinderLocator       = modelBinderLocator;
     this.validatorLocator         = validatorLocator;
     _ravenSessionProvider         = ravenSessionProvider;
 }
Ejemplo n.º 7
0
        public DefaultNancyModuleBuilderFixture()
        {
            this.module = new FakeNancyModule();

            this.responseFormatterFactory =
                A.Fake <IResponseFormatterFactory>();

            this.viewFactory        = A.Fake <IViewFactory>();
            this.modelBinderLocator = A.Fake <IModelBinderLocator>();
            this.builder            = new DefaultNancyModuleBuilder(this.viewFactory, this.responseFormatterFactory, this.modelBinderLocator);
        }
 public NotFoundErrorHandler(IResponseFormatterFactory responseFormatterFactory)
 {
     _responseFormatterFactory = responseFormatterFactory;
 }
 public UnauthorisedHandler(IResponseFormatterFactory responseFormatterFactory)
 {
     _responseFormatterFactory = responseFormatterFactory;
 }