Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
        public GroupCommand Get(IGroupCommand command)
        {
            if (command.Parallel)
                return GroupCommand.Parallel(command);
            else
                return GroupCommand.Sequential(command);

            throw new ArgumentException();
        }
Ejemplo n.º 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));
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 6
0
        public GroupCommand Get(IGroupCommand command)
        {
            if (command.Parallel)
            {
                return(GroupCommand.Parallel(command));
            }
            else
            {
                return(GroupCommand.Sequential(command));
            }

            throw new ArgumentException();
        }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
        }
Ejemplo n.º 10
0
        public static GroupCommand Parallel(IGroupCommand group)
        {
            var cmd = new GroupCommand(group.Commands, true);

            return(cmd);
        }
Ejemplo n.º 11
0
        public static GroupCommand Sequential(IGroupCommand group)
        {
            var cmd = new GroupCommand(group.Commands, false);

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