示例#1
0
 /// <inheritdoc />
 public ContentService(ILogger <ContentService> logger, IContentCommand contentCommand, ISystemClock systemClock, IGroupCommand groupCommand)
 {
     _systemClock    = systemClock ?? throw new ArgumentNullException(nameof(systemClock));
     _contentCommand = contentCommand ?? throw new ArgumentNullException(nameof(contentCommand));
     _logger         = logger ?? throw new ArgumentNullException(nameof(logger));
     _groupCommand   = groupCommand;
 }
        public GroupCommand Get(IGroupCommand command)
        {
            if (command.Parallel)
                return GroupCommand.Parallel(command);
            else
                return GroupCommand.Sequential(command);

            throw new ArgumentException();
        }
示例#3
0
 public FolderService(ISystemClock systemClock, ILogger <DiscussionService> logger, IPermissionsService permissionsService,
                      IFolderCommand folderCommand, IGroupCommand groupCommand)
 {
     _systemClock        = systemClock ?? throw new ArgumentNullException(nameof(systemClock));
     _folderCommand      = folderCommand ?? throw new ArgumentNullException(nameof(folderCommand));
     _groupCommand       = groupCommand ?? throw new ArgumentNullException(nameof(groupCommand));
     _permissionsService = permissionsService ?? throw new ArgumentNullException(nameof(permissionsService));
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
 }
示例#4
0
 public DiscussionService(ISystemClock systemClock, ILogger <DiscussionService> logger, IPermissionsService permissionsService, IDiscussionCommand discussionCommand, IGroupCommand groupCommand, IEntityCommand entityCommand)
 {
     _systemClock        = systemClock;
     _discussionCommand  = discussionCommand;
     _groupCommand       = groupCommand;
     _permissionsService = permissionsService;
     _logger             = logger;
     _entityCommand      = entityCommand;
 }
示例#5
0
 public FileService(ISystemClock systemClock, ILogger <DiscussionService> logger, IPermissionsService permissionsService, IFileCommand fileCommand, IFileBlobStorageProvider blobStorageProvider, IFileTypeValidator fileTypeValidator, IGroupCommand groupCommand)
 {
     _systemClock         = systemClock;
     _fileCommand         = fileCommand;
     _blobStorageProvider = blobStorageProvider;
     _permissionsService  = permissionsService;
     _fileTypeValidator   = fileTypeValidator;
     _groupCommand        = groupCommand;
     _logger = logger;
 }
示例#6
0
        public GroupCommand Get(IGroupCommand command)
        {
            if (command.Parallel)
            {
                return(GroupCommand.Parallel(command));
            }
            else
            {
                return(GroupCommand.Sequential(command));
            }

            throw new ArgumentException();
        }
示例#7
0
 public GroupMembershipService(ILogger <GroupMembershipService> logger,
                               ISystemClock systemClock,
                               IGroupCommand groupCommand,
                               IRolesCommand rolesCommand,
                               IUserCommand userCommand,
                               IPermissionsService permissionsService,
                               IGroupMemberNotificationService groupMemberNotificationService)
 {
     _logger                         = logger ?? throw new ArgumentNullException(nameof(logger));
     _systemClock                    = systemClock ?? throw new ArgumentNullException(nameof(systemClock));
     _groupCommand                   = groupCommand ?? throw new ArgumentNullException(nameof(groupCommand));
     _rolesCommand                   = rolesCommand ?? throw new ArgumentNullException(nameof(rolesCommand));
     _userCommand                    = userCommand ?? throw new ArgumentNullException(nameof(userCommand));
     _permissionsService             = permissionsService ?? throw new ArgumentNullException(nameof(permissionsService));
     _groupMemberNotificationService = groupMemberNotificationService ?? throw new ArgumentNullException(nameof(groupMemberNotificationService));
 }
示例#8
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="context"></param>
 /// <param name="roleService"> </param>
 /// <param name="notificationService"> </param>
 /// <param name="GroupPermissionForRoleService"></param>
 /// <param name="cacheService"></param>
 public GroupService(IMvcForumContext context, IRoleService roleService,
                     INotificationService notificationService, IGroupPermissionForRoleService GroupPermissionForRoleService,
                     ICacheService cacheService, IGroupRepository groupRepository, ILocalizationService localizationService,
                     IGroupCommand groupCommand, IImageService imageService, IImageCommand imageCommand,
                     IImageRepository imageRepository)
 {
     _context                       = context ?? throw new ArgumentNullException(nameof(context));
     _roleService                   = roleService ?? throw new ArgumentNullException(nameof(roleService));
     _notificationService           = notificationService ?? throw new ArgumentNullException(nameof(notificationService));
     _groupPermissionForRoleService = GroupPermissionForRoleService ?? throw new ArgumentNullException(nameof(GroupPermissionForRoleService));
     _cacheService                  = cacheService ?? throw new ArgumentNullException(nameof(context));
     _groupRepository               = groupRepository ?? throw new ArgumentNullException(nameof(groupRepository));
     _localizationService           = localizationService ?? throw new ArgumentNullException(nameof(localizationService));
     _groupCommand                  = groupCommand ?? throw new ArgumentNullException(nameof(groupCommand));
     _imageService                  = imageService ?? throw new ArgumentNullException(nameof(imageService));
     _imageCommand                  = imageCommand ?? throw new ArgumentNullException(nameof(imageCommand));
     _imageRepository               = imageRepository ?? throw new ArgumentNullException(nameof(imageRepository));
 }
示例#9
0
        private const long MaxFileSizeBytes          = 5242880; // 5MB

        public AdminGroupService(ISystemClock systemClock,
                                 ILogger <AdminGroupService> logger,
                                 IPermissionsService permissionsService,
                                 IImageBlobStorageProvider blobStorageProvider,
                                 IFileTypeValidator fileTypeValidator,
                                 IGroupImageService imageService,
                                 IGroupCommand groupCommand,
                                 IHtmlSanitizer htmlSanitizer,
                                 IContentService contentService)
        {
            _systemClock         = systemClock ?? throw new ArgumentNullException(nameof(systemClock));
            _blobStorageProvider = blobStorageProvider ?? throw new ArgumentNullException(nameof(blobStorageProvider));
            _permissionsService  = permissionsService ?? throw new ArgumentNullException(nameof(permissionsService));
            _fileTypeValidator   = fileTypeValidator ?? throw new ArgumentNullException(nameof(fileTypeValidator));
            _groupCommand        = groupCommand ?? throw new ArgumentNullException(nameof(groupCommand));
            _logger         = logger ?? throw new ArgumentNullException(nameof(logger));
            _imageService   = imageService ?? throw new ArgumentNullException(nameof(imageService));
            _htmlSanitizer  = htmlSanitizer ?? throw new ArgumentNullException(nameof(htmlSanitizer));
            _contentService = contentService ?? throw new ArgumentNullException(nameof(contentService));
        }
示例#10
0
        public static GroupCommand Parallel(IGroupCommand group)
        {
            var cmd = new GroupCommand(group.Commands, true);

            return(cmd);
        }
示例#11
0
        public static GroupCommand Sequential(IGroupCommand group)
        {
            var cmd = new GroupCommand(group.Commands, false);

            return(cmd);
        }
示例#12
0
 public override void BeginEdit(IGroupCommand <ITableCommand <TKey, ReadableTuple <TKey> > > command)
 {
     _tables.ForEach(p => p.Commands.Begin());
 }
示例#13
0
 public void Callback(IGroupCommand command)
 {
     base.SetCommand(command);
 }
示例#14
0
 public static GroupCommand Sequential(IGroupCommand group)
 {
     var cmd = new GroupCommand(group.Commands, false);
     return cmd;
 }
示例#15
0
 public static GroupCommand Parallel(IGroupCommand group)
 {
     var cmd = new GroupCommand(group.Commands, true);
     return cmd;
 }