Example #1
0
 public GameRunner(ILogger <GameRunner> logger, GameState gameState, ISegmentRepository segmentRepository, IUserRepository userRepository)
 {
     _logger            = logger;
     _gameState         = gameState;
     _segmentRepository = segmentRepository;
     _userRepository    = userRepository;
 }
Example #2
0
 public Ai(TicTacZapController tacZapController, GameState gameState, ISegmentRepository segmentRepository, IUserRepository userRepository)
 {
     _tacZapController = tacZapController;
     _gameState = gameState;
     _segmentRepository = segmentRepository;
     _userRepository = userRepository;
 }
Example #3
0
 public SegmentEditReactionHandler(IDiscordClient client, TicTacZapController ticTacZapController, ISegmentRepository segmentRepository, IInventoryRepository inventoryRepository)
 {
     _client = client;
     _ticTacZapController = ticTacZapController;
     _segmentRepository   = segmentRepository;
     _inventoryRepository = inventoryRepository;
 }
Example #4
0
 public TicTacZapController(GameState gameState, IUserRepository userRepository, ISegmentRepository segmentRepository, ITemplateRepository templateRepository)
 {
     _gameState          = gameState;
     _userRepository     = userRepository;
     _segmentRepository  = segmentRepository;
     _templateRepository = templateRepository;
 }
Example #5
0
 public Block(TicTacZapController tacZapController, GameState gameState, IUserRepository userRepository, IInventoryRepository inventoryRepository, ISegmentRepository segmentRepository)
 {
     _tacZapController    = tacZapController;
     _gameState           = gameState;
     _userRepository      = userRepository;
     _inventoryRepository = inventoryRepository;
     _segmentRepository   = segmentRepository;
 }
Example #6
0
 public SegmentTemplate(TicTacZapController tacZapController, GameState gameState, ISegmentRepository segmentRepository, ITemplateRepository templateRepository, IUserRepository userRepository, IInventoryRepository inventoryRepository)
 {
     _tacZapController    = tacZapController;
     _gameState           = gameState;
     _segmentRepository   = segmentRepository;
     _templateRepository  = templateRepository;
     _userRepository      = userRepository;
     _inventoryRepository = inventoryRepository;
 }
Example #7
0
 public AddSegmentService(
     ISegmentRepository repository,
     AddSegmentSpecification specification,
     IEnumerable <ISegmentAdded> eventHandlers)
 {
     this.repository    = repository;
     this.eventHandlers = eventHandlers;
     this.specification = specification;
 }
Example #8
0
 public ExchangeUseCase(ILogger <ExchangeUseCase> logger,
                        IExchangeService exchangeService,
                        ISegmentRepository segmentRepository,
                        ICurrencyRepository currencyRepository)
 {
     this.logger             = logger;
     this.exchangeService    = exchangeService;
     this.segmentRepository  = segmentRepository;
     this.currencyRepository = currencyRepository;
 }
Example #9
0
 public SegmentModule(TicTacZapController tacZapController, SegmentEditReactionHandler editReactionHandler, GameState gameState, IUserRepository userRepository, ISegmentRepository segmentRepository, IInventoryRepository inventoryRepository, IUniverseRepository universeRepository)
 {
     _tacZapController    = tacZapController;
     _editReactionHandler = editReactionHandler;
     _gameState           = gameState;
     _userRepository      = userRepository;
     _segmentRepository   = segmentRepository;
     _inventoryRepository = inventoryRepository;
     _universeRepository  = universeRepository;
 }
Example #10
0
 public BaseController()
 {
     this.closestToPinRepository = new ClosestToPinRepository(dataContext);
     this.courseRepository       = new CourseRepository(dataContext);
     this.segmentRepository      = new SegmentRepository(dataContext);
     this.holeRepository         = new HoleRepository(dataContext);
     this.messageRepository      = new MessageRepository(dataContext);
     this.scoreRepository        = new ScoreRepository(dataContext);
     this.teamRepository         = new TeamRepository(dataContext);
 }
 public CustomersController(
     ISegmentRepository segmentRepository,
     ICustomerRepository customerRepository,
     ICustomerService customerService,
     IMapper mapper,
     INotifier notificador) : base(notificador)
 {
     _segmentRepository  = segmentRepository;
     _customerRepository = customerRepository;
     _customerService    = customerService;
     _mapper             = mapper;
 }
 public ProspectsController(
     IProspectRepository context,
     IProspectService service,
     ICategoryRepository categoryRepository,
     IEmployeeRepository employeeRepository,
     ICustomerRepository customerRepository,
     ISegmentRepository segmentRepository,
     ICompanyRepository companyRepository,
     IMapper mapper,
     ILogger logger,
     INotifier notificador) : base(notificador)
 {
     _context            = context;
     _categoryRepository = categoryRepository;
     _employeeRepository = employeeRepository;
     _customerRepository = customerRepository;
     _segmentRepository  = segmentRepository;
     _companyRepository  = companyRepository;
     _service            = service;
     _mapper             = mapper;
     _logger             = logger;
 }
Example #13
0
		void CheckForOtherOccurrences()
		{
			var allAnalysesCandidatesOfWordform = new List<IAnalysis>
													{
														m_srcwfiWordform
													};
			foreach (var anal in m_srcwfiWordform.AnalysesOC)
			{
				allAnalysesCandidatesOfWordform.Add(anal);
				foreach (var gloss in anal.MeaningsOC)
					allAnalysesCandidatesOfWordform.Add(gloss);
			}
			var allUsedSegments = new HashSet<ISegment>();
			foreach (var segment in m_cache.ServiceLocator.GetInstance<ISegmentRepository>().AllInstances().Where(
				segment => segment.AnalysesRS.Any(allAnalysesCandidatesOfWordform.Contains)))
			{
				allUsedSegments.Add(segment);
			}
			// There are 'other' occurrences if some of the real ones aren't in the displayed list.
			if (m_repoSeg == null)
				m_repoSeg = m_cache.ServiceLocator.GetInstance<ISegmentRepository>();
			var enabledSegments = new HashSet<ISegment>();
			foreach (int hvoFake in m_enabledItems)
			{
				int hvoSeg = m_specialSda.get_ObjectProp(hvoFake, ConcDecorator.kflidSegment);
				if (hvoSeg > 0)
					enabledSegments.Add(m_repoSeg.GetObject(hvoSeg));
			}
			m_fOtherOccurrencesExist = allUsedSegments.Union(enabledSegments).Count() != allUsedSegments.Count();
		}
Example #14
0
 protected override void MakeVc()
 {
     m_vc      = new InterlinTaggingVc(m_cache);
     m_tagFact = m_cache.ServiceLocator.GetInstance <ITextTagFactory>();
     m_segRepo = m_cache.ServiceLocator.GetInstance <ISegmentRepository>();
 }
Example #15
0
 public AI(ISegmentRepository segmentRepository, int segmentId)
 {
     _controller = new AIController(segmentRepository, segmentId);
 }
 public SegmentService(ISegmentRepository segmentRepository)
 {
     _segmentRepository = segmentRepository;
 }
Example #17
0
 public GetSegmentsQueryHandler(ISegmentRepository segmentRepository)
 {
     _segmentRepository = segmentRepository;
 }
Example #18
0
 public SegmentController(ILogger <SegmentController> logger,
                          ISegmentRepository segmentRepository)
 {
     this.logger            = logger;
     this.segmentRepository = segmentRepository;
 }
Example #19
0
 public AddSegmentSpecification(ISegmentRepository repository)
 {
     this.repository = repository;
 }
Example #20
0
 public Segments(ISegmentRepository segmentRepository, IUniverseRepository universeRepository)
 {
     _segmentRepository  = segmentRepository;
     _universeRepository = universeRepository;
 }
Example #21
0
 public SegmentService(ISegmentRepository repository) : base(repository)
 {
     _segmentRepository = repository;
 }
Example #22
0
 public AppDivisionSegmentsService(ITeamRepository _teamRepository, ISegmentRepository _segRepository, IDivisionRepository _repository)
 {
     teamRepository = _teamRepository;
     segRepository  = _segRepository;
     repository     = _repository;
 }
Example #23
0
 public async Task<Segment> GetById([FromQuery] int id, 
     [FromServices] ISegmentRepository repository)
     => await repository.GetById(id);
 public UpdateSegmentCommandHandler(ISegmentRepository segmentRepository, INotificationContext notificationContext)
 {
     _segmentRepository   = segmentRepository;
     _notificationContext = notificationContext;
 }
Example #25
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="TeEditingHelper"/> class.
		/// </summary>
		/// <param name="callbacks">The callbacks.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="filterInstance">The filter instance.</param>
		/// <param name="viewType">Type of the view.</param>
		/// <param name="app">The app.</param>
		/// ------------------------------------------------------------------------------------
		public TeEditingHelper(IEditingCallbacks callbacks, FdoCache cache, int filterInstance,
			TeViewType viewType, IApp app)
			: base(cache, callbacks)
		{
			if (m_cache == null)
				throw new ArgumentNullException("cache");

			m_scr = m_cache.LangProject.TranslatedScriptureOA;
			m_app = app;

			IFdoServiceLocator servloc = m_cache.ServiceLocator;
			m_repoStText = servloc.GetInstance<IStTextRepository>();
			m_repoScrTxtPara = servloc.GetInstance<IScrTxtParaRepository>();
			m_repoScrBook = servloc.GetInstance<IScrBookRepository>();
			m_repoScrSection = servloc.GetInstance<IScrSectionRepository>();
			m_repoScrFootnote = servloc.GetInstance<IScrFootnoteRepository>();
			m_repoCmTrans = servloc.GetInstance<ICmTranslationRepository>();
			m_wsContainer = servloc.WritingSystems;
			m_repoCmObject = servloc.GetInstance<ICmObjectRepository>();
			m_repoSegment = servloc.GetInstance<ISegmentRepository>();

			m_viewType = viewType;
			m_filterInstance = filterInstance;
			PasteFixTssEvent += RemoveHardFormatting;
		}
Example #26
0
 public AIController(ISegmentRepository segmentRepository, int segmentId)
 {
     _segmentRepository = segmentRepository;
     _segmentId         = segmentId;
     _seg = _segmentRepository.GetSegmentAsync(segmentId).GetAwaiter().GetResult();
 }
Example #27
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="InterlinVc"/> class.
		/// </summary>
		/// <remarks>We use the default analysis writing system as the default, even though
		/// this view displays data in multiple writing systems. It's pretty arbitrary in this
		/// case, but we need a valid WS because if we get an ORC, we have to create a Ts String
		/// using some writing system.</remarks>
		/// <param name="cache">The cache.</param>
		/// ------------------------------------------------------------------------------------
		public InterlinVc(FdoCache cache) : base(cache.DefaultAnalWs)
		{
			Cache = cache;
			m_wsManager = m_cache.ServiceLocator.WritingSystemManager;
			m_segRepository = m_cache.ServiceLocator.GetInstance<ISegmentRepository>();
			m_coRepository = m_cache.ServiceLocator.GetInstance<ICmObjectRepository>();
			m_wmbRepository = m_cache.ServiceLocator.GetInstance<IWfiMorphBundleRepository>();
			m_analRepository = m_cache.ServiceLocator.GetInstance<IWfiAnalysisRepository>();
			StTxtParaRepository = m_cache.ServiceLocator.GetInstance<IStTxtParaRepository>();
			m_wsAnalysis = cache.DefaultAnalWs;
			m_wsUi = cache.LanguageWritingSystemFactoryAccessor.UserWs;
			Decorator = new InterlinViewDataCache(m_cache);
			PreferredVernWs = cache.DefaultVernWs;
			m_selfFlid = m_cache.MetaDataCacheAccessor.GetFieldId2(CmObjectTags.kClassId, "Self", false);
			m_tssMissingGloss = m_tsf.MakeString(ITextStrings.ksStars, m_wsAnalysis);
			m_tssMissingGlossPrepend = m_tsf.MakeString(ITextStrings.ksStars + MorphServices.kDefaultSeparatorLexEntryInflTypeGlossAffix, m_wsAnalysis);
			m_tssMissingGlossAppend = m_tsf.MakeString(MorphServices.kDefaultSeparatorLexEntryInflTypeGlossAffix + ITextStrings.ksStars, m_wsAnalysis);
			m_tssMissingSense = m_tssMissingGloss;
			m_tssMissingMsa = m_tssMissingGloss;
			m_tssMissingAnalysisPos = m_tssMissingGloss;
			m_tssEmptyAnalysis = m_tsf.MakeString("", m_wsAnalysis);
			m_WsList = new WsListManager(m_cache);
			m_tssEmptyPara = m_tsf.MakeString(ITextStrings.ksEmptyPara, m_wsAnalysis);
			m_tssSpace = m_tsf.MakeString(" ", m_wsAnalysis);
			m_msaVc = new MoMorphSynAnalysisUi.MsaVc(m_cache);
			m_vernWss = WritingSystemServices.GetAllWritingSystems(m_cache, "all vernacular",
				null, 0, 0);
			// This usually gets overridden, but ensures default behavior if not.
			m_lineChoices = InterlinLineChoices.DefaultChoices(m_cache.LangProject,
				WritingSystemServices.kwsVernInParagraph, WritingSystemServices.kwsAnal);
			// This used to be a constant but was made variables with dummy virtual handlers so that
			// ClearInfoAbout can clear them out.
			// load guesses
			ktagSegmentForms = SegmentTags.kflidAnalyses;
			GetSegmentLevelTags(cache);
			LangProjectHvo = m_cache.LangProject.Hvo;
		}
		protected override void MakeVc()
		{
			m_vc = new InterlinTaggingVc(m_fdoCache);
			m_tagFact = m_fdoCache.ServiceLocator.GetInstance<ITextTagFactory>();
			m_segRepo = m_fdoCache.ServiceLocator.GetInstance<ISegmentRepository>();
		}