public RestrictionModule(IRestrictionService restrictionService) { _restrictionService = restrictionService; GetResourceById = Get; GetResourceAll = GetAll; CreateResource = Create; UpdateResource = Update; DeleteResource = Delete; }
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"); } }); }
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); } } }
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; }
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"); } }); }
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); }); }
public ReleaseRestrictionsSpecification(IRestrictionService restrictionService, Logger logger) { _restrictionService = restrictionService; _logger = logger; }
public RestrictionController(IMapper mapper, IRestrictionService restrictionService) { this.mapper = mapper; this.restrictionService = restrictionService; }
public ReleaseRestrictionsSpecification(ITermMatcher termMatcher, IRestrictionService restrictionService, Logger logger) { _logger = logger; _restrictionService = restrictionService; _termMatcher = termMatcher; }
public RestrictionTableController(IRestrictionService restrictionService) { _restrictionService = restrictionService; }
public RestrictionDetailController(IRestrictionService restrictionService) { _restrictionService = restrictionService; }