Beispiel #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;
 }
 public UserRolesController(
     [WithKey(ServiceKeys.UserRoleRepository)] IScalarRepository<int, User> userRolesRepository,
     [WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userRepository)
     :base(userRepository)
 {
     this.userRolesRepository = userRolesRepository;
 }
 public UserAlbumController(
      [WithKey(ServiceKeys.UserDatabase)] IScalarRepository<string, User> userDatabaseRepository,
      IScalarRepository<int, Album> albumRepository)
     : base(userDatabaseRepository)
 {
     this.albumRepository = albumRepository;
 }
 /// <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;
 }
 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;
 }
Beispiel #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];
 }
Beispiel #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;
 }
 /// <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;
 }
 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;
 }
Beispiel #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;
 }