Ejemplo n.º 1
0
        public RestrictionModule(IRestrictionService restrictionService)
        {
            _restrictionService = restrictionService;

            GetResourceById = Get;
            GetResourceAll  = GetAll;
            CreateResource  = Create;
            UpdateResource  = Update;
            DeleteResource  = Delete;
        }
Ejemplo n.º 2
0
        public RestrictionController(IRestrictionService restrictionService)
        {
            _restrictionService = restrictionService;

            SharedValidator.RuleFor(d => d).Custom((restriction, context) =>
            {
                if (restriction.Ignored.IsNullOrWhiteSpace() && restriction.Required.IsNullOrWhiteSpace())
                {
                    context.AddFailure("Either 'Must contain' or 'Must not contain' is required");
                }
            });
        }
Ejemplo n.º 3
0
        public void LoadRestriction(IRestrictionService restrictionService)
        {
            IEnumerable <RestrictionView> restricts = restrictionService.GetAllRestrictions().Restrictions;

            restrictions.Clear();
            foreach (RestrictionView restrict in restricts)
            {
                if (!restrictions.ContainsKey(restrict.RestrictionName))
                {
                    restrictions.Add(restrict.RestrictionName, restrict.RequirePermission);
                }
            }
        }
Ejemplo n.º 4
0
 public TagService(ITagRepository repo,
                   IEventAggregator eventAggregator,
                   IDelayProfileService delayProfileService,
                   IImportListFactory importListFactory,
                   INotificationFactory notificationFactory,
                   IRestrictionService restrictionService,
                   IMovieService movieService)
 {
     _repo                = repo;
     _eventAggregator     = eventAggregator;
     _delayProfileService = delayProfileService;
     _importListFactory   = importListFactory;
     _notificationFactory = notificationFactory;
     _restrictionService  = restrictionService;
     _movieService        = movieService;
 }
Ejemplo n.º 5
0
        public RestrictionModule(IRestrictionService restrictionService)
        {
            _restrictionService = restrictionService;

            GetResourceById = GetRestriction;
            GetResourceAll  = GetAllRestrictions;
            CreateResource  = CreateRestriction;
            UpdateResource  = UpdateRestriction;
            DeleteResource  = DeleteRestriction;

            SharedValidator.RuleFor(r => r).Custom((restriction, context) =>
            {
                if (restriction.Ignored.IsNullOrWhiteSpace() && restriction.Required.IsNullOrWhiteSpace())
                {
                    context.AddFailure("Either 'Must contain' or 'Must not contain' is required");
                }
            });
        }
Ejemplo n.º 6
0
        public RestrictionModule(IRestrictionService restrictionService)
        {
            _restrictionService = restrictionService;

            GetResourceById = GetRestriction;
            GetResourceAll  = GetAllRestrictions;
            CreateResource  = CreateRestriction;
            UpdateResource  = UpdateRestriction;
            DeleteResource  = DeleteRestriction;

            SharedValidator.Custom(restriction =>
            {
                if (restriction.Ignored.IsNullOrWhiteSpace() && restriction.Required.IsNullOrWhiteSpace())
                {
                    return(new ValidationFailure("", "Either 'Must contain' or 'Must not contain' is required"));
                }

                return(null);
            });
        }
Ejemplo n.º 7
0
 public ReleaseRestrictionsSpecification(IRestrictionService restrictionService, Logger logger)
 {
     _restrictionService = restrictionService;
     _logger             = logger;
 }
Ejemplo n.º 8
0
 public RestrictionController(IMapper mapper, IRestrictionService restrictionService)
 {
     this.mapper             = mapper;
     this.restrictionService = restrictionService;
 }
Ejemplo n.º 9
0
 public ReleaseRestrictionsSpecification(ITermMatcher termMatcher, IRestrictionService restrictionService, Logger logger)
 {
     _logger             = logger;
     _restrictionService = restrictionService;
     _termMatcher        = termMatcher;
 }
Ejemplo n.º 10
0
 public RestrictionTableController(IRestrictionService restrictionService)
 {
     _restrictionService = restrictionService;
 }
 public RestrictionDetailController(IRestrictionService restrictionService)
 {
     _restrictionService = restrictionService;
 }
 public ReleaseRestrictionsSpecification(IRestrictionService restrictionService, Logger logger)
 {
     _restrictionService = restrictionService;
     _logger = logger;
 }