/// <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(); }
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)); }
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; }
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; }
public GroupCommand Get(IGroupCommand command) { if (command.Parallel) { return(GroupCommand.Parallel(command)); } else { return(GroupCommand.Sequential(command)); } throw new ArgumentException(); }
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)); }
/// <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)); }
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)); }
public static GroupCommand Parallel(IGroupCommand group) { var cmd = new GroupCommand(group.Commands, true); return(cmd); }
public static GroupCommand Sequential(IGroupCommand group) { var cmd = new GroupCommand(group.Commands, false); return(cmd); }
public override void BeginEdit(IGroupCommand <ITableCommand <TKey, ReadableTuple <TKey> > > command) { _tables.ForEach(p => p.Commands.Begin()); }
public void Callback(IGroupCommand command) { base.SetCommand(command); }
public static GroupCommand Sequential(IGroupCommand group) { var cmd = new GroupCommand(group.Commands, false); return cmd; }
public static GroupCommand Parallel(IGroupCommand group) { var cmd = new GroupCommand(group.Commands, true); return cmd; }