public override void Given()
 {
     Selector             = CreateStub <ActionResultSelector>();
     actionResultResolver = new FluentMvcResolver(actionResultRegistry, CreateStub <IFluentMvcObjectFactory>(), new ActionFilterResolver(actionFilterRegistry, CreateStub <IFluentMvcObjectFactory>()));
     CatchAllFactory      = CreateStub <IActionResultFactory>();
     actionResultResolver.SetDefaultFactory(CatchAllFactory);
 }
Exemplo n.º 2
0
        public TDsl WithResultFactory <TFactory>(ConstraintDsl constraintDsl)
            where TFactory : IActionResultFactory
        {
            IActionResultFactory factory = CreateFactory <TFactory>();

            return(WithResultFactory(factory, constraintDsl));
        }
 public override void Given()
 {
     Selector = CreateStub<ActionResultSelector>();
     actionResultResolver = new FluentMvcResolver(actionResultRegistry, CreateStub<IFluentMvcObjectFactory>(), new ActionFilterResolver(actionFilterRegistry, CreateStub<IFluentMvcObjectFactory>()));
     CatchAllFactory = CreateStub<IActionResultFactory>();
     actionResultResolver.SetDefaultFactory(CatchAllFactory);
 }
Exemplo n.º 4
0
 public ActionInvokerFactory(IActionResultFactory actionResultFactory,
                             IActionDescriptorProvider actionDescriptorProvider, 
                             IActionInvokerProvider actionInvokerProvider)
 {
     _actionResultFactory = actionResultFactory;
     _actionDescriptorProvider = actionDescriptorProvider;
     _actionInvokerProvider = actionInvokerProvider;
 }
Exemplo n.º 5
0
 public ActionInvokerFactory(IActionResultFactory actionResultFactory,
                             IActionDescriptorProvider actionDescriptorProvider, 
                             IActionInvokerProvider actionInvokerProvider)
 {
     _actionResultFactory = actionResultFactory;
     _actionDescriptorProvider = actionDescriptorProvider;
     _actionInvokerProvider = actionInvokerProvider;
 }
Exemplo n.º 6
0
 public AuthenticateHelper(IParameterParserHelper parameterParserHelper, IActionResultFactory actionResultFactory, IConsentHelper consentHelper, IGenerateAuthorizationResponse generateAuthorizationResponse, IClientRepository clientRepository, IAmrHelper amrHelper)
 {
     _parameterParserHelper         = parameterParserHelper;
     _actionResultFactory           = actionResultFactory;
     _consentHelper                 = consentHelper;
     _generateAuthorizationResponse = generateAuthorizationResponse;
     _clientRepository              = clientRepository;
     _amrHelper = amrHelper;
 }
 public AuthenticateResourceOwnerOpenIdAction(
     IParameterParserHelper parameterParserHelper,
     IActionResultFactory actionResultFactory,
     IAuthenticateHelper authenticateHelper)
 {
     _parameterParserHelper = parameterParserHelper;
     _actionResultFactory   = actionResultFactory;
     _authenticateHelper    = authenticateHelper;
 }
Exemplo n.º 8
0
        public virtual TDsl WithResultFactory(IActionResultFactory factory, ConstraintDsl constraintDsl)
        {
            var constraint = constraintDsl.GetConstraintRegistrations(objectFactory);

            factory.SetConstraints(constraint.Select(x => x.Constraint));

            actionResultRegistry.Add(new ActionResultRegistryItem(factory));

            return((TDsl)this);
        }
Exemplo n.º 9
0
 public ControllerActionInvoker(RequestContext requestContext,
                                ControllerBasedActionDescriptor descriptor,
                                IActionResultFactory actionResultFactory,
                                IServiceProvider serviceProvider)
 {
     _requestContext      = requestContext;
     _descriptor          = descriptor;
     _actionResultFactory = actionResultFactory;
     _serviceProvider     = serviceProvider;
 }
Exemplo n.º 10
0
 public ControllerActionInvoker(RequestContext requestContext,
                                ControllerBasedActionDescriptor descriptor, 
                                IActionResultFactory actionResultFactory, 
                                IServiceProvider serviceProvider)
 {
     _requestContext = requestContext;
     _descriptor = descriptor;
     _actionResultFactory = actionResultFactory;
     _serviceProvider = serviceProvider;
 }
Exemplo n.º 11
0
        public TDsl WithResultFactory(IActionResultFactory defaultFactory, bool isDefault)
        {
            if (isDefault)
            {
                Convention.DefaultFactory = defaultFactory;
            }
            else
            {
                WithResultFactory(defaultFactory);
            }

            return((TDsl)this);
        }
Exemplo n.º 12
0
        protected Controller(IHttpRequest request, IActionResultFactory actionResultFactory)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            if (actionResultFactory == null)
            {
                throw new ArgumentNullException(nameof(actionResultFactory));
            }

            this.Request = request;
            this._actionResultFactory = actionResultFactory;
        }
 public DisplayConsentAction(
     IScopeRepository scopeRepository,
     IClientRepository clientRepository,
     IConsentHelper consentHelper,
     IGenerateAuthorizationResponse generateAuthorizationResponse,
     IParameterParserHelper parameterParserHelper,
     IActionResultFactory actionResultFactory)
 {
     _scopeRepository  = scopeRepository;
     _clientRepository = clientRepository;
     _consentHelper    = consentHelper;
     _generateAuthorizationResponse = generateAuthorizationResponse;
     _parameterParserHelper         = parameterParserHelper;
     _actionResultFactory           = actionResultFactory;
 }
 public ProcessAuthorizationRequest(
     IParameterParserHelper parameterParserHelper,
     IClientValidator clientValidator,
     IScopeValidator scopeValidator,
     IActionResultFactory actionResultFactory,
     IConsentHelper consentHelper,
     IJwtParser jwtParser,
     IConfigurationService configurationService,
     IOAuthEventSource oauthEventSource)
 {
     _parameterParserHelper = parameterParserHelper;
     _clientValidator       = clientValidator;
     _scopeValidator        = scopeValidator;
     _actionResultFactory   = actionResultFactory;
     _consentHelper         = consentHelper;
     _jwtParser             = jwtParser;
     _configurationService  = configurationService;
     _oauthEventSource      = oauthEventSource;
 }
Exemplo n.º 15
0
        public IActionResult GetActionResult(IActionResultFactory actionResultFactory)
        {
            IActionResult CreateAcceptedActionResult()
            {
                return(actionResultFactory.Accepted(Parameters["LocationUrl"], Response));
            }

            IActionResult CreateCreatedActionResult()
            {
                return(actionResultFactory.Created(Parameters["LocationUrl"], Response));
            }

            return(StatusCode switch
            {
                HttpStatusCode.Accepted => CreateAcceptedActionResult(),
                HttpStatusCode.Created => CreateCreatedActionResult(),
                HttpStatusCode.OK => actionResultFactory.Ok(Response),
                HttpStatusCode.NotFound => actionResultFactory.NotFound(Response),
                HttpStatusCode.BadRequest => actionResultFactory.BadRequest(Response),
                _ => throw new Exception()
            });
 public ConfirmConsentAction(
     IConsentRepository consentRepository,
     IClientRepository clientRepository,
     IScopeRepository scopeRepository,
     IResourceOwnerRepository resourceOwnerRepository,
     IParameterParserHelper parameterParserHelper,
     IActionResultFactory actionResultFactory,
     IGenerateAuthorizationResponse generateAuthorizationResponse,
     IConsentHelper consentHelper,
     IOpenIdEventSource openidEventSource)
 {
     _consentRepository             = consentRepository;
     _clientRepository              = clientRepository;
     _scopeRepository               = scopeRepository;
     _resourceOwnerRepository       = resourceOwnerRepository;
     _parameterParserHelper         = parameterParserHelper;
     _actionResultFactory           = actionResultFactory;
     _generateAuthorizationResponse = generateAuthorizationResponse;
     _consentHelper     = consentHelper;
     _openidEventSource = openidEventSource;
 }
Exemplo n.º 17
0
 public ConfirmConsentAction(
     IConsentRepository consentRepository,
     IClientRepository clientRepository,
     IScopeRepository scopeRepository,
     IResourceOwnerRepository resourceOwnerRepository,
     IParameterParserHelper parameterParserHelper,
     IActionResultFactory actionResultFactory,
     IGenerateAuthorizationResponse generateAuthorizationResponse,
     IConsentHelper consentHelper,
     ISimpleIdentityServerEventSource simpleIdentityServerEventSource,
     IAuthenticateResourceOwnerService authenticateResourceOwnerService)
 {
     _consentRepository             = consentRepository;
     _clientRepository              = clientRepository;
     _scopeRepository               = scopeRepository;
     _resourceOwnerRepository       = resourceOwnerRepository;
     _parameterParserHelper         = parameterParserHelper;
     _actionResultFactory           = actionResultFactory;
     _generateAuthorizationResponse = generateAuthorizationResponse;
     _consentHelper = consentHelper;
     _simpleIdentityServerEventSource  = simpleIdentityServerEventSource;
     _authenticateResourceOwnerService = authenticateResourceOwnerService;
 }
Exemplo n.º 18
0
 public override void Given()
 {
     ExpectedDefaultFactory = CreateStub<IActionResultFactory>();
     Configuration = FluentMvcConfiguration.Create();
 }
Exemplo n.º 19
0
 public override void Given()
 {
     resultFactory = CreateStub<AbstractActionResultFactory>();
     Configuration = FluentMvcConfiguration.Create();
 }
Exemplo n.º 20
0
 public override void Given()
 {
     ExpectedDefaultFactory = CreateStub <IActionResultFactory>();
     Configuration          = FluentMvcConfiguration.Create();
 }
Exemplo n.º 21
0
 public ApiController(IHttpRequest request, IActionResultFactory actionResultFactory)
     : base(request, actionResultFactory)
 {
 }
Exemplo n.º 22
0
 protected virtual void AddFactory(IActionResultFactory factory)
 {
     Factories.Enqueue(factory);
 }
Exemplo n.º 23
0
        public TDsl WithResultFactory(IActionResultFactory resultFactory)
        {
            Convention.Factories.Enqueue(resultFactory);

            return((TDsl)this);
        }
Exemplo n.º 24
0
 public ActionInvokerProvider(IActionResultFactory actionResultFactory,
                              IServiceProvider serviceProvider)
 {
     _actionResultFactory = actionResultFactory;
     _serviceProvider = serviceProvider;
 }
Exemplo n.º 25
0
 public void SetDefaultFactory(IActionResultFactory factory)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 26
0
 public ActionInvokerProvider(IActionResultFactory actionResultFactory,
                              IServiceProvider serviceProvider)
 {
     _actionResultFactory = actionResultFactory;
     _serviceProvider     = serviceProvider;
 }
Exemplo n.º 27
0
 public void SetDefaultFactory(IActionResultFactory factory)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 28
0
 public void SetDefaultFactory(IActionResultFactory factory)
 {
     defaultFactory = factory;
 }
Exemplo n.º 29
0
 public override void Given()
 {
     Configuration = FluentMvcConfiguration.Create();
     Child1        = CreateStub <IActionResultFactory>();
     Child2        = CreateStub <IActionResultFactory>();
 }
Exemplo n.º 30
0
 public override void Given()
 {
     Configuration = FluentMvcConfiguration.Create();
     Child1 = CreateStub<IActionResultFactory>();
     Child2 = CreateStub<IActionResultFactory>();
 }
Exemplo n.º 31
0
 public MetroDialogHelper(IDialogCoordinator dialog, IActionResultFactory arf)
 {
     _dialog = dialog;
     _arf    = arf;
 }
Exemplo n.º 32
0
 public void SetDefaultFactory(IActionResultFactory factory)
 {
     actionResultResolver.SetDefaultFactory(factory);
 }
Exemplo n.º 33
0
 public void SetDefaultFactory(IActionResultFactory factory)
 {
     actionResultResolver.SetDefaultFactory(factory);
 }
Exemplo n.º 34
0
 protected virtual void AddFactory(IActionResultFactory factory)
 {
     Factories.Enqueue(factory);
 }
Exemplo n.º 35
0
 protected Controller(IHttpRequest request, IActionResultFactory actionResultFactory)
 {
     this.actionResultFactory = actionResultFactory;
     this.Request             = request;
 }
Exemplo n.º 36
0
 protected void SetDefaultFactory(IActionResultFactory factory)
 {
     DefaultFactory = factory;
 }
Exemplo n.º 37
0
 public void SetDefaultFactory(IActionResultFactory factory)
 {
     defaultFactory = factory;
 }
Exemplo n.º 38
0
 public SiteMapService(IActionResultFactory actionResultFactory, IBaseUrlProvider baseUrlProvider, IXmlNamespaceProvider xmlNamespaceProvider)
 {
     this.actionResultFactory  = actionResultFactory;
     this.baseUrlProvider      = baseUrlProvider;
     this.xmlNamespaceProvider = xmlNamespaceProvider;
 }
Exemplo n.º 39
0
 public ActionResultRegistryItem(IActionResultFactory factory) : base(new InstanceItemActivator(factory), EmptyActionDescriptor.Instance, EmptyControllerDescriptor.Instance)
 {
     Constraint = new ListConstraint(factory.Constraints);
 }
Exemplo n.º 40
0
 protected void SetDefaultFactory(IActionResultFactory factory)
 {
     DefaultFactory = factory;
 }
Exemplo n.º 41
0
 public override void Given()
 {
     resultFactory = CreateStub <AbstractActionResultFactory>();
     Configuration = FluentMvcConfiguration.Create();
 }