public override void Given()
 {
     Selector             = CreateStub <ActionResultSelector>();
     actionResultResolver = new FluentMvcResolver(actionResultRegistry, CreateStub <IFluentMvcObjectFactory>(), new ActionFilterResolver(actionFilterRegistry, CreateStub <IFluentMvcObjectFactory>()));
     CatchAllFactory      = CreateStub <IActionResultFactory>();
     actionResultResolver.SetDefaultFactory(CatchAllFactory);
 }
Beispiel #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);
 }
Beispiel #4
0
 public ActionInvokerFactory(IActionResultFactory actionResultFactory,
                             IActionDescriptorProvider actionDescriptorProvider, 
                             IActionInvokerProvider actionInvokerProvider)
 {
     _actionResultFactory = actionResultFactory;
     _actionDescriptorProvider = actionDescriptorProvider;
     _actionInvokerProvider = actionInvokerProvider;
 }
Beispiel #5
0
 public ActionInvokerFactory(IActionResultFactory actionResultFactory,
                             IActionDescriptorProvider actionDescriptorProvider, 
                             IActionInvokerProvider actionInvokerProvider)
 {
     _actionResultFactory = actionResultFactory;
     _actionDescriptorProvider = actionDescriptorProvider;
     _actionInvokerProvider = actionInvokerProvider;
 }
Beispiel #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;
 }
Beispiel #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);
        }
Beispiel #9
0
 public ControllerActionInvoker(RequestContext requestContext,
                                ControllerBasedActionDescriptor descriptor,
                                IActionResultFactory actionResultFactory,
                                IServiceProvider serviceProvider)
 {
     _requestContext      = requestContext;
     _descriptor          = descriptor;
     _actionResultFactory = actionResultFactory;
     _serviceProvider     = serviceProvider;
 }
 public ControllerActionInvoker(RequestContext requestContext,
                                ControllerBasedActionDescriptor descriptor, 
                                IActionResultFactory actionResultFactory, 
                                IServiceProvider serviceProvider)
 {
     _requestContext = requestContext;
     _descriptor = descriptor;
     _actionResultFactory = actionResultFactory;
     _serviceProvider = serviceProvider;
 }
Beispiel #11
0
        public TDsl WithResultFactory(IActionResultFactory defaultFactory, bool isDefault)
        {
            if (isDefault)
            {
                Convention.DefaultFactory = defaultFactory;
            }
            else
            {
                WithResultFactory(defaultFactory);
            }

            return((TDsl)this);
        }
Beispiel #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;
 }
Beispiel #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;
 }
Beispiel #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;
 }
 public override void Given()
 {
     ExpectedDefaultFactory = CreateStub<IActionResultFactory>();
     Configuration = FluentMvcConfiguration.Create();
 }
 public override void Given()
 {
     resultFactory = CreateStub<AbstractActionResultFactory>();
     Configuration = FluentMvcConfiguration.Create();
 }
Beispiel #20
0
 public override void Given()
 {
     ExpectedDefaultFactory = CreateStub <IActionResultFactory>();
     Configuration          = FluentMvcConfiguration.Create();
 }
Beispiel #21
0
 public ApiController(IHttpRequest request, IActionResultFactory actionResultFactory)
     : base(request, actionResultFactory)
 {
 }
Beispiel #22
0
 protected virtual void AddFactory(IActionResultFactory factory)
 {
     Factories.Enqueue(factory);
 }
Beispiel #23
0
        public TDsl WithResultFactory(IActionResultFactory resultFactory)
        {
            Convention.Factories.Enqueue(resultFactory);

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