Example #1
0
 public UserContext(ICurrentUserRetriever currentUserRetriever, IUserService userService)
 {
     Contract.Requires<ArgumentNullException>(currentUserRetriever.IsNotNull());
     Contract.Requires<ArgumentNullException>(userService.IsNotNull());
     this.user = new Lazy<User>(currentUserRetriever.GetCurrentUser);
     this.userService = userService;
 }
Example #2
0
 public UserContext(ICurrentUserRetriever currentUserRetriever, IUserService userService)
 {
     Contract.Requires <ArgumentNullException>(currentUserRetriever.IsNotNull());
     Contract.Requires <ArgumentNullException>(userService.IsNotNull());
     this.user        = new Lazy <User>(currentUserRetriever.GetCurrentUser);
     this.userService = userService;
 }
Example #3
0
 public EmailController(ILoggerFactory loggerFactory, SqlServerDataSource sqlServerDataSource,
                        IOptions <WebApiConfiguration> options, ICurrentUserRetriever currentUserRetriever,
                        Jibberwock.Persistence.DataAccess.Utility.Interfaces.IHashCalculator hashCalculator)
     : base(loggerFactory, sqlServerDataSource, options, currentUserRetriever)
 {
     _hashCalculator           = hashCalculator;
     _appInsightsConfiguration = options?.Value.AppInsightsConfiguration;
 }
Example #4
0
 public CurrentUserProjectsQueryHandler(GSDRequirementsContext context,
                                        ICurrentUserRetriever <User> currentUserRetriever,
                                        ICurrentLocaleName currentLocaleName)
 {
     _context = context;
     _currentUserRetriever = currentUserRetriever;
     _currentLocaleName    = currentLocaleName;
 }
 public ResourcePermissionHandler(IHttpContextAccessor httpContextAccessor, ILoggerFactory loggerFactory, IOptions <WebApiConfiguration> options, ICurrentUserRetriever currentUserRetriever, SqlServerDataSource dataSource)
 {
     _httpContext          = httpContextAccessor.HttpContext;
     _logger               = loggerFactory?.CreateLogger <ResourcePermissionHandler>();
     _configuration        = options?.Value;
     _currentUserRetriever = currentUserRetriever;
     _dataSource           = dataSource;
 }
 /// <summary>
 /// Creates a new instance of the <see cref="JibberwockControllerBase"/> class.
 /// </summary>
 /// <param name="loggerFactory">The logger factory.</param>
 /// <param name="sqlServerDataSource">The SQL Server data source.</param>
 /// <param name="options">The web API configuration.</param>
 protected JibberwockControllerBase(ILoggerFactory loggerFactory, SqlServerDataSource sqlServerDataSource, IOptions <WebApiConfiguration> options, ICurrentUserRetriever currentUserRetriever)
     : base()
 {
     SqlServerDataSource = sqlServerDataSource;
     LoggerFactory       = loggerFactory;
     Logger = LoggerFactory.CreateLogger(GetType());
     WebApiConfiguration  = options.Value;
     CurrentUserRetriever = currentUserRetriever;
 }
 public AuditingDecorator(ICommandHandler <T> decorated,
                          ICurrentProjectContextId currentProjectContextId,
                          ICurrentUserRetriever <User> currentUserRetriever,
                          ICommandHandler <AddAuditingCommand> addAuditingCommandHandler)
 {
     _decorated = decorated;
     _currentProjectContextId   = currentProjectContextId;
     _currentUserRetriever      = currentUserRetriever;
     _addAuditingCommandHandler = addAuditingCommandHandler;
 }
 public CreateIssueCommentCommandHandler(ICurrentUserRetriever <User> currentUserRetriever,
                                         IRepository <IssueComment, Guid> issueCommentRepository,
                                         ICurrentProjectContextId currentProjectContextId,
                                         IRepository <IssueCommentContent, LocaleKey> issueCommentContentRepository)
 {
     _currentUserRetriever          = currentUserRetriever;
     _issueCommentRepository        = issueCommentRepository;
     _currentProjectContextId       = currentProjectContextId;
     _issueCommentContentRepository = issueCommentContentRepository;
 }
 public CreateProjectCommandHandler(IRepository <Project, Guid> projectRepository,
                                    IRepository <ProjectContent, LocaleKey> projectContentRepository,
                                    ICurrentUserRetriever <User> currentUserRetriever,
                                    IQueryHandler <ProjectNextIdQuery, int> projectNextIdQuery,
                                    IRepository <Permission, Guid> permissionRepository)
 {
     _projectRepository        = projectRepository;
     _projectContentRepository = projectContentRepository;
     _currentUserRetriever     = currentUserRetriever;
     _projectNextIdQuery       = projectNextIdQuery;
     _permissionRepository     = permissionRepository;
 }
Example #10
0
 public CreateRequirementVersionCommandHandler(
     IRepository <Requirement, VersionKey> requirementRepository,
     IRepository <RequirementContent, LocaleKey> requirementContentRepository,
     IQueryHandler <SpecificationItemWithRequirementsQuery, SpecificationItemWithRequirementsQueryResult> specificationItemWithRequirementsQueryHandler,
     IRepository <Package, Guid> packageRepository,
     ICurrentUserRetriever <User> currentUserRetriever
     )
 {
     _requirementRepository        = requirementRepository;
     _requirementContentRepository = requirementContentRepository;
     _specificationItemWithRequirementsQueryHandler = specificationItemWithRequirementsQueryHandler;
     _packageRepository    = packageRepository;
     _currentUserRetriever = currentUserRetriever;
 }
Example #11
0
 public CreatePackageCommandHandler(IRepository <Package, Guid> packageRepository,
                                    IRepository <PackageContent, LocaleKey> packageContentRepository,
                                    ICurrentUserRetriever <User> currentUserRetriever,
                                    IRepository <Project, Guid> projectRepository,
                                    ICurrentProjectContextId currentProjectContextId,
                                    IQueryHandler <PackageNextIdQuery, int> packageNextIdQueryHandler)
 {
     _packageRepository         = packageRepository;
     _packageContentRepository  = packageContentRepository;
     _currentUserRetriever      = currentUserRetriever;
     _projectRepository         = projectRepository;
     _currentProjectContextId   = currentProjectContextId;
     _packageNextIdQueryHandler = packageNextIdQueryHandler;
 }
 public CreateRequirementCommandHandler(
     IRepository <Requirement, VersionKey> requirementRepository,
     IRepository <RequirementContent, LocaleKey> requirementContentRepository,
     IRepository <SpecificationItem, Guid> specificationItemRepository,
     IRepository <Package, Guid> packageRepository,
     ICurrentUserRetriever <User> currentUserRetriever,
     IRepository <Project, Guid> projectRepository,
     ICurrentProjectContextId currentProjectContextId,
     IQueryHandler <RequirementNextIdQuery, int> requirementNextIdQueryHandler
     )
 {
     _requirementRepository         = requirementRepository;
     _requirementContentRepository  = requirementContentRepository;
     _specificationItemRepository   = specificationItemRepository;
     _packageRepository             = packageRepository;
     _currentUserRetriever          = currentUserRetriever;
     _projectRepository             = projectRepository;
     _currentProjectContextId       = currentProjectContextId;
     _requirementNextIdQueryHandler = requirementNextIdQueryHandler;
 }
Example #13
0
 public StatusController(ILoggerFactory loggerFactory, SqlServerDataSource sqlServerDataSource,
                         IOptions <WebApiConfiguration> options, ICurrentUserRetriever currentUserRetriever)
     : base(loggerFactory, sqlServerDataSource, options, currentUserRetriever)
 {
     _appInsightsConfiguration = options?.Value.AppInsightsConfiguration;
 }
 public UpdateUserCommandHandler(IQueryHandler <ContactByUserIdQuery, Contact> contactByUserIdQueryHandler,
                                 ICurrentUserRetriever <User> currentUserRetriever)
 {
     _contactByUserIdQueryHandler = contactByUserIdQueryHandler;
     _currentUserRetriever        = currentUserRetriever;
 }
Example #15
0
 public ChangeUserPasswordCommandHandler(ICryptographer cryptographer,
                                         ICurrentUserRetriever <User> currentUserRetriever)
 {
     _cryptographer        = cryptographer;
     _currentUserRetriever = currentUserRetriever;
 }
 public InvitationController(ILoggerFactory loggerFactory, SqlServerDataSource sqlServerDataSource,
                             IOptions <WebApiConfiguration> options, ICurrentUserRetriever currentUserRetriever)
     : base(loggerFactory, sqlServerDataSource, options, currentUserRetriever)
 {
 }
Example #17
0
 public TenantController(ILoggerFactory loggerFactory, SqlServerDataSource sqlServerDataSource,
                         IOptions <WebApiConfiguration> options, ICurrentUserRetriever currentUserRetriever, IQueueDataSource queueDataSource)
     : base(loggerFactory, sqlServerDataSource, options, currentUserRetriever)
 {
     _queueDataSource = queueDataSource;
 }
 public VenueWatchItemController(IVenueWatchRepository venueWatchRepository, ICurrentUserRetriever currentUserRetriever)
 {
     _venueWatchRepository = venueWatchRepository;
     _currentUserRetriever = currentUserRetriever;
 }
 public ProjectsPaginatedQueryHandler(GSDRequirementsContext context,
                                      ICurrentUserRetriever <User> currentUserRetriever)
 {
     _context = context;
     _currentUserRetriever = currentUserRetriever;
 }
Example #20
0
 public AuditingsByPeriodQueryHandler(GSDRequirementsContext context,
                                      ICurrentUserRetriever <User> currentUserRetriever)
 {
     _context = context;
     _currentUserRetriever = currentUserRetriever;
 }
 public DeleteIssueCommentCommandHandler(ICurrentUserRetriever <User> currentUserRetriever,
                                         IRepository <IssueComment, Guid> issueCommentRepository)
 {
     _currentUserRetriever   = currentUserRetriever;
     _issueCommentRepository = issueCommentRepository;
 }