Beispiel #1
0
 public DemoTvSearchEngine(ICurrentUser identity, IRequestServiceMain service, ITvMazeApi tvMaze, IMapper mapper,
                           ITraktApi trakt, IRuleEvaluator r, OmbiUserManager um, ICacheService memCache,
                           ISettingsService <OmbiSettings> s, IRepository <RequestSubscription> sub, IOptions <DemoLists> lists, IImageService imageService,
                           ISettingsService <CustomizationSettings> custom)
     : base(identity, service, tvMaze, mapper, trakt, r, um, custom, memCache, s, sub, imageService, null)
 {
     _demoLists = lists.Value;
 }
Beispiel #2
0
 protected BaseMediaEngine(IPrincipal identity, IRequestServiceMain requestService,
                           IRuleEvaluator rules, OmbiUserManager um, ICacheService cache, ISettingsService <OmbiSettings> ombiSettings, IRepository <RequestSubscription> sub) : base(identity, um, rules)
 {
     RequestService          = requestService;
     Cache                   = cache;
     OmbiSettings            = ombiSettings;
     _subscriptionRepository = sub;
 }
Beispiel #3
0
 public MovieSearchEngine(IPrincipal identity, IRequestServiceMain service, IMovieDbApi movApi, IMapper mapper,
                          ILogger <MovieSearchEngine> logger, IRuleEvaluator r, OmbiUserManager um, ICacheService mem, ISettingsService <OmbiSettings> s, IRepository <RequestSubscription> sub)
     : base(identity, service, r, um, mem, s, sub)
 {
     MovieApi = movApi;
     Mapper   = mapper;
     Logger   = logger;
 }
Beispiel #4
0
 public DemoTvSearchEngine(IPrincipal identity, IRequestServiceMain service, ITvMazeApi tvMaze, IMapper mapper,
                           ISettingsService <PlexSettings> plexSettings, ISettingsService <EmbySettings> embySettings, IPlexContentRepository repo,
                           IEmbyContentRepository embyRepo, ITraktApi trakt, IRuleEvaluator r, OmbiUserManager um, ICacheService memCache,
                           ISettingsService <OmbiSettings> s, IRepository <RequestSubscription> sub, IOptions <DemoLists> lists)
     : base(identity, service, tvMaze, mapper, plexSettings, embySettings, repo, embyRepo, trakt, r, um, memCache, s, sub)
 {
     _demoLists = lists.Value;
 }
Beispiel #5
0
 public QuoteService(
     IRepository <Employee> employeeRepository,
     IRuleEvaluator discountCalculator
     )
 {
     _employeeRepository = employeeRepository;
     _discountCalculator = discountCalculator;
 }
Beispiel #6
0
 public MovieSearchEngine(IPrincipal identity, IRequestServiceMain service, IMovieDbApi movApi, IMapper mapper,
                          ILogger <MovieSearchEngine> logger, IRuleEvaluator r, OmbiUserManager um, ICacheService mem)
     : base(identity, service, r, um)
 {
     MovieApi = movApi;
     Mapper   = mapper;
     Logger   = logger;
     MemCache = mem;
 }
Beispiel #7
0
 public MovieRequestEngine(IMovieDbApi movieApi, IRequestServiceMain requestService, IPrincipal user,
                           INotificationHelper helper, IRuleEvaluator r, IMovieSender sender, ILogger <MovieRequestEngine> log,
                           OmbiUserManager manager, IRepository <RequestLog> rl, ICacheService cache, ISettingsService <OmbiSettings> ombiSettings) : base(user, requestService, r, manager, cache, ombiSettings)
 {
     MovieApi           = movieApi;
     NotificationHelper = helper;
     Sender             = sender;
     Logger             = log;
     _requestLog        = rl;
 }
Beispiel #8
0
 public FuzzyRuleSet(FuzzySet <T> varSet, List <FuzzyRule <T> > rules, IRuleEvaluator <T> ruleEvaluator, IFuzzyValuesMerger <T> outputsMerger, IDefuzzer <T> defuzzer)
 {
     FuzzyUtils.IsGenericParameterValid <T>();
     this.rules          = rules;
     this.OutputVarSet   = varSet;
     this.OutputValueSet = new FuzzyValueSet();
     this.RuleEvaluator  = ruleEvaluator;
     this.OutputsMerger  = outputsMerger;
     this.Defuzzer       = defuzzer;
 }
Beispiel #9
0
 public DmarcRecordParser(ITagParser tagParser,
                          IRuleEvaluator <DmarcRecord> ruleEvaluator,
                          IImplicitProvider <Tag> implicitProvider,
                          IExplainer <Tag> explainer)
 {
     _tagParser        = tagParser;
     _ruleEvaluator    = ruleEvaluator;
     _implicitProvider = implicitProvider;
     _explainer        = explainer;
 }
Beispiel #10
0
 public MusicSearchEngine(IPrincipal identity, IRequestServiceMain service, ILidarrApi lidarrApi, IMapper mapper,
                          ILogger <MusicSearchEngine> logger, IRuleEvaluator r, OmbiUserManager um, ICacheService mem, ISettingsService <OmbiSettings> s, IRepository <RequestSubscription> sub,
                          ISettingsService <LidarrSettings> lidarrSettings)
     : base(identity, service, r, um, mem, s, sub)
 {
     _lidarrApi      = lidarrApi;
     _lidarrSettings = lidarrSettings;
     Mapper          = mapper;
     Logger          = logger;
 }
Beispiel #11
0
 public TvRequestEngine(ITvMazeApi tvApi, IRequestServiceMain requestService, IPrincipal user,
                        INotificationHelper helper, IRuleEvaluator rule, OmbiUserManager manager,
                        ITvSender sender, IAuditRepository audit, IRepository <RequestLog> rl) : base(user, requestService, rule, manager)
 {
     TvApi = tvApi;
     NotificationHelper = helper;
     TvSender           = sender;
     Audit       = audit;
     _requestLog = rl;
 }
Beispiel #12
0
 public TvRequestEngine(ITvMazeApi tvApi, IMovieDbApi movApi, IRequestServiceMain requestService, IPrincipal user,
                        INotificationHelper helper, IRuleEvaluator rule, OmbiUserManager manager,
                        ITvSender sender, IRepository <RequestLog> rl, ISettingsService <OmbiSettings> settings, ICacheService cache,
                        IRepository <RequestSubscription> sub) : base(user, requestService, rule, manager, cache, settings, sub)
 {
     TvApi              = tvApi;
     MovieDbApi         = movApi;
     NotificationHelper = helper;
     TvSender           = sender;
     _requestLog        = rl;
 }
Beispiel #13
0
 public TvSearchEngineV2(IPrincipal identity, IRequestServiceMain service, ITvMazeApi tvMaze, IMapper mapper,
                         ITraktApi trakt, IRuleEvaluator r, OmbiUserManager um, ICacheService memCache, ISettingsService <OmbiSettings> s,
                         IRepository <RequestSubscription> sub, IMovieDbApi movieApi, ISettingsService <CustomizationSettings> customization)
     : base(identity, service, r, um, memCache, s, sub)
 {
     _tvMaze        = tvMaze;
     _mapper        = mapper;
     _traktApi      = trakt;
     _movieApi      = movieApi;
     _customization = customization;
 }
Beispiel #14
0
 public MovieSearchEngineV2(IPrincipal identity, IRequestServiceMain service, IMovieDbApi movApi, IMapper mapper,
                            ILogger <MovieSearchEngineV2> logger, IRuleEvaluator r, OmbiUserManager um, ICacheService mem, ISettingsService <OmbiSettings> s, IRepository <RequestSubscription> sub,
                            ISettingsService <CustomizationSettings> customizationSettings, IMovieRequestEngine movieRequestEngine, IHttpClientFactory httpClientFactory)
     : base(identity, service, r, um, mem, s, sub)
 {
     MovieApi = movApi;
     Mapper   = mapper;
     Logger   = logger;
     _customizationSettings = customizationSettings;
     _movieRequestEngine    = movieRequestEngine;
     _client = httpClientFactory.CreateClient();
 }
Beispiel #15
0
 public TvSearchEngine(IPrincipal identity, IRequestServiceMain service, ITvMazeApi tvMaze, IMapper mapper,
                       ITraktApi trakt, IRuleEvaluator r, OmbiUserManager um, ISettingsService <CustomizationSettings> customizationSettings,
                       ICacheService memCache, ISettingsService <OmbiSettings> s, IRepository <RequestSubscription> sub, IImageService imageService,
                       IMovieDbApi theMovieDbApi)
     : base(identity, service, r, um, memCache, s, sub)
 {
     _imageService          = imageService;
     _theMovieDbApi         = theMovieDbApi;
     TvMazeApi              = tvMaze;
     Mapper                 = mapper;
     TraktApi               = trakt;
     _customizationSettings = customizationSettings;
 }
 public SpfRecordParser(ISpfVersionParser versionParser,
                        ITermParser termParser,
                        IRuleEvaluator <SpfRecord> spfRecordRulesEvaluator,
                        IImplicitProvider <Term> implicitTermProvider,
                        IExplainer <Domain.Version> versionExplainer,
                        IExplainer <Term> termExplainer)
 {
     _versionParser           = versionParser;
     _termParser              = termParser;
     _spfRecordRulesEvaluator = spfRecordRulesEvaluator;
     _implicitTermProvider    = implicitTermProvider;
     _versionExplainer        = versionExplainer;
     _termExplainer           = termExplainer;
 }
Beispiel #17
0
 public MusicRequestEngine(IRequestServiceMain requestService, IPrincipal user,
                           INotificationHelper helper, IRuleEvaluator r, ILogger <MusicRequestEngine> log,
                           OmbiUserManager manager, IRepository <RequestLog> rl, ICacheService cache,
                           ISettingsService <OmbiSettings> ombiSettings, IRepository <RequestSubscription> sub, ILidarrApi lidarr,
                           ISettingsService <LidarrSettings> lidarrSettings, IMusicSender sender)
     : base(user, requestService, r, manager, cache, ombiSettings, sub)
 {
     NotificationHelper = helper;
     _musicSender       = sender;
     Logger             = log;
     _requestLog        = rl;
     _lidarrApi         = lidarr;
     _lidarrSettings    = lidarrSettings;
 }
Beispiel #18
0
 public MovieRequestEngine(IMovieDbApi movieApi, IRequestServiceMain requestService, ICurrentUser user,
                           INotificationHelper helper, IRuleEvaluator r, IMovieSender sender, ILogger <MovieRequestEngine> log,
                           OmbiUserManager manager, IRepository <RequestLog> rl, ICacheService cache,
                           ISettingsService <OmbiSettings> ombiSettings, IRepository <RequestSubscription> sub, IMediaCacheService mediaCacheService,
                           IFeatureService featureService)
     : base(user, requestService, r, manager, cache, ombiSettings, sub)
 {
     MovieApi           = movieApi;
     NotificationHelper = helper;
     Sender             = sender;
     Logger             = log;
     _requestLog        = rl;
     _mediaCacheService = mediaCacheService;
     _featureService    = featureService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RuleInvoker" /> class.
 /// </summary>
 /// <param name="resolver">The dependency resolver.</param>
 /// <param name="evaluator">The evaluator.</param>
 /// <param name="processor">The processor.</param>
 /// <exception cref="System.ArgumentNullException">
 /// </exception>
 public RuleInvoker(IServiceResolver resolver, IRuleEvaluator evaluator, IRuleProcessor processor)
 {
     if (resolver == null)
     {
         throw new ArgumentNullException(nameof(resolver));
     }
     if (evaluator == null)
     {
         throw new ArgumentNullException(nameof(evaluator));
     }
     if (processor == null)
     {
         throw new ArgumentNullException(nameof(processor));
     }
     Resolver  = resolver;
     Evaluator = evaluator;
     Processor = processor;
 }
Beispiel #20
0
        /// <summary>
        /// Template Method
        /// </summary>
        /// <param name="traits">Character traits to initialize</param>
        /// <param name="qualityRuleEvaluator"></param>
        /// <param name="emotionRuleEvaluator"></param>
        public void Initialize(ref CharacterTraits traits, IRuleEvaluator qualityRuleEvaluator,
                               IRuleEvaluator emotionRuleEvaluator)
        {
            RandomlyInitializeAllQualities(traits);

            AdjustQualitiesAccordingToArchetype(traits);

            SetPersonalValuesAccordingToArchetype(traits);

            AddRandomStrongPoint(traits);
            AddRandomWeakPoint(traits);

            traits.StrongPoints = StrongPoints;
            traits.WeakPoints   = WeakPoints;

            traits.SetMyEnergy(traits.Energetic <= Constants.MaxWeakPoint ? 25 : 50);

            ApplyRulesToQualityTraits(traits, qualityRuleEvaluator);

            InitializeEmotionalStates(traits, emotionRuleEvaluator);
        }
Beispiel #21
0
 protected BaseEngine(ICurrentUser user, OmbiUserManager um, IRuleEvaluator rules)
 {
     CurrentUser = user;
     Rules       = rules;
     UserManager = um;
 }
 public void WhenICallReconcile()
 {
     _reconcileEngine  = new RuleSetEvaluator(_ruleSet);
     _reconciledResult = _reconcileEngine.Evaluate(trans1, trans2);
 }
Beispiel #23
0
 public MusicSearchEngineV2(ICurrentUser identity, IRequestServiceMain requestService, IRuleEvaluator rules,
                            OmbiUserManager um, ICacheService cache, ISettingsService <OmbiSettings> ombiSettings,
                            IRepository <RequestSubscription> sub, IMusicBrainzApi musicBrainzApi, ISettingsService <LidarrSettings> lidarrSettings,
                            ILidarrApi lidarrApi)
     : base(identity, requestService, rules, um, cache, ombiSettings, sub)
 {
     _musicBrainzApi = musicBrainzApi;
     _lidarrSettings = lidarrSettings;
     _lidarrApi      = lidarrApi;
 }
Beispiel #24
0
 protected BaseMediaEngine(IPrincipal identity, IRequestServiceMain requestService,
                           IRuleEvaluator rules, OmbiUserManager um) : base(identity, um, rules)
 {
     RequestService = requestService;
 }
Beispiel #25
0
 protected BaseEngine(IPrincipal user, OmbiUserManager um, IRuleEvaluator rules)
 {
     UserPrinciple = user;
     Rules         = rules;
     UserManager   = um;
 }
Beispiel #26
0
 public TvSearchEngine(IPrincipal identity, IRequestServiceMain service, ITvMazeApi tvMaze, IMapper mapper, ISettingsService <PlexSettings> plexSettings,
                       ISettingsService <EmbySettings> embySettings, IPlexContentRepository repo, IEmbyContentRepository embyRepo, ITraktApi trakt, IRuleEvaluator r, OmbiUserManager um,
                       ICacheService memCache, ISettingsService <OmbiSettings> s, IRepository <RequestSubscription> sub)
     : base(identity, service, r, um, memCache, s, sub)
 {
     TvMazeApi       = tvMaze;
     Mapper          = mapper;
     PlexSettings    = plexSettings;
     EmbySettings    = embySettings;
     PlexContentRepo = repo;
     TraktApi        = trakt;
     EmbyContentRepo = embyRepo;
 }
Beispiel #27
0
 public VoteEngine(IRepository <Votes> votes, IPrincipal user, OmbiUserManager um, IRuleEvaluator r, ISettingsService <VoteSettings> voteSettings,
                   IMusicRequestEngine musicRequestEngine, ITvRequestEngine tvRequestEngine, IMovieRequestEngine movieRequestEngine) : base(user, um, r)
 {
     _voteRepository     = votes;
     _voteSettings       = voteSettings;
     _movieRequestEngine = movieRequestEngine;
     _musicRequestEngine = musicRequestEngine;
     _tvRequestEngine    = tvRequestEngine;
 }
Beispiel #28
0
 public DmarcConfigParser(IDmarcRecordParser recordParser,
                          IRuleEvaluator <DmarcConfig> configRuleEvaluator)
 {
     _recordParser        = recordParser;
     _configRuleEvaluator = configRuleEvaluator;
 }
Beispiel #29
0
 public NextSlotScheduleStrategy(IRuleEvaluator ruleEvaluator)
 {
     _ruleEvaluator = ruleEvaluator;
 }
 public ScheduleStrategy(IRuleEvaluator ruleEvaluator)
 {
     _ruleEvaluator = ruleEvaluator;
 }
Beispiel #31
0
 public Controller(INumberSource numbers, IRuleEvaluator ruleEvaluator, IOutput output)
 {
     _numbers = numbers;
     _ruleEvaluator = ruleEvaluator;
     _output = output;
 }