public DefaultLinksHandlerContextFactory(IRouteMap routeMap, ILinkAuthorizationService authService, IActionContextAccessor actionAccessor, ILoggerFactory loggerFactory) { this.routeMap = routeMap; this.authService = authService; this.actionContext = actionAccessor.ActionContext; this.loggerFactory = loggerFactory; }
public LinksAuthorizationTestCase(ILinkAuthorizationService underTest, ClaimsPrincipal user, IRouteMap routeMap, Mock <IAuthorizationService> authServiceMock) { this.UnderTest = underTest; this.User = user; this.routeMap = routeMap; this.AuthorizationServiceMock = authServiceMock; }
public LinksHandlerContext( IEnumerable <ILinksRequirement> requirements, IRouteMap routeMap, ILinkAuthorizationService authService, ILogger <LinksHandlerContext> logger, ActionContext actionContext, object resource) { if (requirements == null) { throw new ArgumentNullException(nameof(requirements)); } if (routeMap == null) { throw new ArgumentNullException(nameof(routeMap)); } if (authService == null) { throw new ArgumentNullException(nameof(authService)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (actionContext == null) { throw new ArgumentNullException(nameof(actionContext)); } if (resource == null) { throw new ArgumentNullException(nameof(resource)); } this.Requirements = requirements; this.RouteMap = routeMap; this.ActionContext = actionContext; this.Resource = resource; this.Logger = logger; this.authService = authService; this.pendingRequirements = new HashSet <ILinksRequirement>(requirements); }
public TestLinksHandlerContextFactory(IRouteMap routeMap, ILinkAuthorizationService authService, ActionContext actionContext) { this.routeMap = routeMap; this.authService = authService; this.actionContext = actionContext; }