Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref=""/>
 /// </summary>
 /// <param name="userDatabaseRepository">The user database repository</param>
 /// <param name="roleRepository">The roles repository</param>
 public RoleController(
     [WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userDatabaseRepository,
     IScalarRepository<int, Role> roleRepository)
     : base(userDatabaseRepository)
 {
     this.roleRepository = roleRepository;
 }
Пример #2
0
 public UserRolesController(
     [WithKey(ServiceKeys.UserRoleRepository)] IScalarRepository<int, User> userRolesRepository,
     [WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userRepository)
     :base(userRepository)
 {
     this.userRolesRepository = userRolesRepository;
 }
Пример #3
0
 public UserAlbumController(
      [WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userDatabaseRepository,
      IScalarRepository<int, Album> albumRepository)
     : base(userDatabaseRepository)
 {
     this.albumRepository = albumRepository;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ManageUserMiddleware"/> class.
 /// </summary>
 /// <param name="next">The next owin middleware</param>
 public ManageUserMiddleware(
     OwinMiddleware next,
     ManageUserOption options
 )
     : base(next)
 {
     quotaKB = options.QuotaKB;
     roleRepository = options.RoleRepository;
     userDatabaseRepository = options.UserDatabaseRepository;
     userActiveDirectoryRepository = options.UserActiveDirectoryRepository;
     logger = options.Logger;
 }
Пример #5
0
 public ForumTitleController(
     [WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userDatabaseRepository,
     [WithKey(ServiceKeys.ThreadPostTitleRepository)] IScalarRepository<int, ThreadPostTitle> threadTitleRepository,
     [WithKey(ServiceKeys.ForumCommentsRepository)] IVectorRepository<int, Comment> forumCommentRepository,
     ILogger<ForumTitleController> logger
     )
     : base(userDatabaseRepository)
 {
     this.threadTitleRepository = threadTitleRepository;
     this.forumCommentRepository = forumCommentRepository;
     this.logger = logger;
 }
Пример #6
0
 public GetPage(
     IDbConnection connection,
     IVectorRepository<int, Comment> commentRepo,
     IScalarRepository<int, Image> imageRepo,
     IIndex<ServiceKeys, IScalarRepository<int, ThreadPostContent>> threadRepoIndex,
     IIndex<ServiceKeys, IVectorRepository<int, Comment>> forumCommentRepoIndex
 )
 {
     this.connection = connection;
     this.commentRepo = commentRepo;
     this.imageRepo = imageRepo;
     threadRepo = threadRepoIndex[ServiceKeys.ThreadPostContentRepository];
     forumCommentRepo = forumCommentRepoIndex[ServiceKeys.ForumCommentsRepository];
 }
Пример #7
0
 public ManageUserOption(
     [WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userDatabaseRepository,
     [WithKey(ServiceKeys.UserActiveDirectory)] IScalarRepository<string, User> userActiveDirectoryRepository,
     IScalarRepository<int, Role> roleRepository,
     int quotaKB,
     ILogger<ManageUserMiddleware> logger
 )
 {
     UserDatabaseRepository = userDatabaseRepository;
     UserActiveDirectoryRepository = userActiveDirectoryRepository;
     RoleRepository = roleRepository;
     QuotaKB = quotaKB;
     Logger = logger;
 }
Пример #8
0
 /// <summary>
 /// Instantiates a new <see cref="UserImageController"/> instance.
 /// </summary>
 /// <param name="userImageRepository">The image repository, which stores the images</param>
 public UserImageController(
     [WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userDatabaseRepository,
     IScalarRepository<int, Image> userImageRepository,
     IVectorRepository<int, Comment> imageCommentsRepo,
     ImageHandleFactory imageHandleFactory,
     IAddItem whatsNew,
     IDeleteItem removeNews,
     LatestBroadcastService webSocketService,
     IGetUserSpaceInfo userSpaceHandles
 )
     : base(userDatabaseRepository)
 {
     this.userImageRepository = userImageRepository;
     this.imageCommentsRepo = imageCommentsRepo;
     this.imageHandleFactory = imageHandleFactory;
     this.whatsNew = whatsNew;
     this.removeNews = removeNews;
     this.webSocketService = webSocketService;
     this.userSpaceHandles = userSpaceHandles;
 }
Пример #9
0
 public ForumPostController(
     [WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userDatabaseRepository,
     [WithKey(ServiceKeys.ThreadPostContentRepository)] IScalarRepository<int, ThreadPostContent> postRepository,
     [WithKey(ServiceKeys.ThreadPostTitleRepository)] IScalarRepository<int, ThreadPostTitle> titleRepository,
     [WithKey(ServiceKeys.ForumCommentsRepository)] IVectorRepository<int, Comment> forumCommentRepository,
     IAddItem whatsNew,
     IDeleteItem remove,
     IMarkPost markPost,
     LatestBroadcastService webSocketService,
     ILogger<ForumPostController> logger
 ) : base(userDatabaseRepository)
 {
     this.postRepository = postRepository;
     this.forumCommentRepository = forumCommentRepository;
     this.titleRepository = titleRepository;
     this.whatsNew = whatsNew;
     this.remove = remove;
     this.markPost = markPost;
     this.webSocketService = webSocketService;
     this.logger = logger;
 }
Пример #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultController"/> class.
 /// </summary>
 /// <param name="userDatabaseRepository">The user database repository</param>
 public DefaultController([WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userDatabaseRepository)
 {
     this.userDatabaseRepository = userDatabaseRepository;
 }