/// <summary> /// Creates a new controller instance. /// </summary> /// <param name="service">The service.</param> /// <param name="focusCategoryService">The focus category service.</param> /// <param name="justificationObjectiveService">The justification objective service.</param> /// <param name="authorizationHandler"></param> /// <param name="resourceService"></param> /// <param name="userProvider"></param> public OfficesController(IOfficeService service, IFocusCategoryService focusCategoryService, IJustificationObjectiveService justificationObjectiveService, IResourceService resourceService, IResourceAuthorizationHandler authorizationHandler, IUserProvider userProvider) { Contract.Requires(service != null, "The office service must not be null."); Contract.Requires(focusCategoryService != null, "The focus category service must not be null."); Contract.Requires(justificationObjectiveService != null, "The justification service must not be null."); Contract.Requires(resourceService != null, "The resource service must not be null."); Contract.Requires(authorizationHandler != null, "The authorization handler must not be null."); Contract.Requires(userProvider != null, "The authorization handler must not be null."); this.service = service; this.focusCategoryService = focusCategoryService; this.justificationObjectiveService = justificationObjectiveService; this.resourceService = resourceService; this.authorizationHandler = authorizationHandler; this.userProvider = userProvider; }
/// <summary> /// Creates a new ProgramController with the given program service. /// </summary> /// <param name="programService">The program service.</param> /// <param name="userProvider">The user provider.</param> /// <param name="categoryService">The focus category service.</param> /// <param name="resourceService">The resource service.</param> /// <param name="justificationObjectiveService">The justification objective service.</param> /// <param name="authorizationHandler">the authorization handler service.</param> public ProgramsController(IProgramService programService, IUserProvider userProvider, IFocusCategoryService categoryService, IJustificationObjectiveService justificationObjectiveService, IResourceService resourceService, IResourceAuthorizationHandler authorizationHandler) { Contract.Requires(programService != null, "The program service must not be null."); Contract.Requires(userProvider != null, "The user provider must not be null."); Contract.Requires(categoryService != null, "The category service must not be null."); Contract.Requires(justificationObjectiveService != null, "The justification service must not be null."); Contract.Requires(resourceService != null, "The resource service must not be null."); Contract.Requires(authorizationHandler != null, "The authorization handler must not be null."); this.programService = programService; this.userProvider = userProvider; this.categoryService = categoryService; this.justificationObjectiveService = justificationObjectiveService; this.resourceService = resourceService; this.authorizationHandler = authorizationHandler; }