public ReportsSmartController(IReports repo, ITerminalRepository repoterminal, IPartnerRepository repopartner, IReportGroup repogroup) { _repo = repo; repo_terminal = repoterminal; repo_partner = repopartner; repo_group = repogroup; }
public TerminalBS(ITerminalRepository _terminalRepository) { if (_terminalRepository != null) { this._terminalRepository = _terminalRepository; } }
public StandardNotificationLogClient(ISettingsService settingsService, IRepository <Settings> settingsRepository, INeuronRepository neuronRepository, ITerminalRepository terminalRepository) { this.settingsService = settingsService; this.neuronRepository = neuronRepository; this.terminalRepository = terminalRepository; this.settingsRepository = settingsRepository; this.polling = false; }
public GateService(IGateRepository gateRepository, IAirportRepository airportRepository, IAirportSchemeRepository airportSchemeRepository, ITerminalRepository terminalRepository, IUnitOfWork unitOfWork) { _gateRepository = gateRepository; _airportRepository = airportRepository; _airportSchemeRepository = airportSchemeRepository; _terminalRepository = terminalRepository; _unitOfWork = unitOfWork; }
public UnitOfWork(QueueContext context, IEventBus eventBus, IHubContext <EmpireQueueHub> empireQueueHub) { _hub = empireQueueHub; _context = context; _eventBus = eventBus; EmpireQueues = new QueueRepository(context); Tickets = new TicketRepository(context); TicketCategories = new TicketCategoryRepository(context); TerminalCategories = new TerminalCategoryRepository(context); TerminalTickets = new TerminalTicketRepository(context); Terminals = new TerminalRepository(context); }
public PackageUnitOfWork(DbContext context, IAttachmentRepository attachmentRepository, IPackageRepository packageRepository, IPackageConfigFileRepository packageConfigFileRepository, ITerminalPackageRepository terminalPackageRepository, ITerminalRepository terminalRepository) : base(context) { this.AttatchmentRepository = attachmentRepository; this.PackageRepository = packageRepository; this.PackageConfigFileRepository = packageConfigFileRepository; this.TerminalRepository = terminalRepository; this.TerminalPackageRepository = terminalPackageRepository; }
public TerminalController(ITerminalRepository terminalRepository, IMapper mapper, IPropertyMappingService propertyMappingService, IPropertyCheckerService propertyCheckerService) { _terminalRepository = terminalRepository ?? throw new ArgumentNullException(nameof(terminalRepository)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _propertyMappingService = propertyMappingService ?? throw new ArgumentNullException(nameof(propertyMappingService)); _propertyCheckerService = propertyCheckerService ?? throw new ArgumentNullException(nameof(propertyCheckerService)); }
public TerminalService(ITerminalRepository terminalRepository, IUnitOfWork unitOfWork) { _terminalRepository = terminalRepository; _unitOfWork = unitOfWork; }
public UserController(ITerminalRepository repo) { _repository = repo; _repository.UserName = User?.Identity?.Name; }
public UserController() { _repository = new TerminalRepository { UserName = User?.Identity?.Name }; }
public Handler(ITerminalRepository terminalRepository) { _terminalRepository = terminalRepository; }
public LoginService(IUserRepository userRepository, ITerminalRepository terminalRepository, ClientAdapter clientAdapter) { _userRepository = userRepository; _terminalRepository = terminalRepository; _clientAdapter = clientAdapter; }
public TerminalControllerTest(ITerminalRepository repository) { _TermRepo = repository; }
public TerminalAppService(ITerminalRepository terminalRepository) : base(terminalRepository) { _terminalRepository = terminalRepository; }
public TerminalService(IMapper mapper, IUnitOfWork unitOfWork, ITerminalRepository currentRepository) : base(mapper, unitOfWork, currentRepository) { }
public async Task <bool> Process(INeuronRepository neuronRepository, ITerminalRepository terminalRepository, string eventName, string data, string authorId) { bool result = false; JObject jd = JsonHelper.JObjectParse(data); DomainNeuron n = null; DomainTerminal t = null; var changeTimestamp = string.Empty; switch (eventName) { case "NeuronCreated": changeTimestamp = JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Neuron.NeuronCreated.Timestamp)); n = new DomainNeuron() { Id = JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Neuron.NeuronCreated.Id)), Version = JsonHelper.GetRequiredValue <int>(jd, nameof(EventDataFields.Neuron.NeuronCreated.Version)), CreationTimestamp = changeTimestamp, CreationAuthorId = authorId, Active = true }; await neuronRepository.Save(n); result = true; break; case "TagChanged": n = await neuronRepository.Get( Guid.Parse(JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Tag.TagChanged.Id))) ); n.Tag = JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Tag.TagChanged.Tag)); n.Version = JsonHelper.GetRequiredValue <int>(jd, nameof(EventDataFields.Tag.TagChanged.Version)); n.LastModificationTimestamp = JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Tag.TagChanged.Timestamp)); n.LastModificationAuthorId = authorId; await neuronRepository.Save(n); result = true; break; case "AggregateChanged": n = await neuronRepository.Get( Guid.Parse(JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Aggregate.AggregateChanged.Id))) ); n.RegionId = JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Aggregate.AggregateChanged.Aggregate)); n.Version = JsonHelper.GetRequiredValue <int>(jd, nameof(EventDataFields.Aggregate.AggregateChanged.Version)); n.LastModificationTimestamp = JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Aggregate.AggregateChanged.Timestamp)); n.LastModificationAuthorId = authorId; await neuronRepository.Save(n); result = true; break; case "NeuronDeactivated": n = await neuronRepository.Get( Guid.Parse(JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Neuron.NeuronDeactivated.Id))) ); n.Version = JsonHelper.GetRequiredValue <int>(jd, nameof(EventDataFields.Neuron.NeuronDeactivated.Version)); n.LastModificationTimestamp = JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Neuron.NeuronDeactivated.Timestamp)); n.LastModificationAuthorId = authorId; n.Active = false; await neuronRepository.Save(n); result = true; break; case "TerminalCreated": changeTimestamp = JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Terminal.TerminalCreated.Timestamp)); t = new DomainTerminal( JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Terminal.TerminalCreated.Id)), JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Terminal.TerminalCreated.PresynapticNeuronId)), JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Terminal.TerminalCreated.PostsynapticNeuronId)), (NeurotransmitterEffect)Enum.Parse(typeof(NeurotransmitterEffect), JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Terminal.TerminalCreated.Effect))), JsonHelper.GetRequiredValue <float>(jd, nameof(EventDataFields.Terminal.TerminalCreated.Strength)) ) { Version = JsonHelper.GetRequiredValue <int>(jd, nameof(EventDataFields.Terminal.TerminalCreated.Version)), CreationTimestamp = changeTimestamp, CreationAuthorId = authorId, Active = true }; await terminalRepository.Save(t); n = await neuronRepository.Get(Guid.Parse(t.PresynapticNeuronIdCore)); n.UnifiedLastModificationTimestamp = changeTimestamp; n.UnifiedLastModificationAuthorId = authorId; await neuronRepository.Save(n); result = true; break; case "TerminalDeactivated": changeTimestamp = JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Terminal.TerminalDeactivated.Timestamp)); t = await terminalRepository.Get( Guid.Parse(JsonHelper.GetRequiredValue <string>(jd, nameof(EventDataFields.Terminal.TerminalDeactivated.Id))) ); t.Version = JsonHelper.GetRequiredValue <int>(jd, nameof(EventDataFields.Terminal.TerminalDeactivated.Version)); t.LastModificationTimestamp = changeTimestamp; t.LastModificationAuthorId = authorId; t.Active = false; await terminalRepository.Save(t); n = await neuronRepository.Get(Guid.Parse(t.PresynapticNeuronIdCore)); n.UnifiedLastModificationTimestamp = changeTimestamp; n.UnifiedLastModificationAuthorId = authorId; await neuronRepository.Save(n); result = true; break; } return(result); }
public DisputesController(IDisputeRepository repository, ITerminalRepository terminalRepository) { _DisputeRepository = repository; _TerminalRepository = terminalRepository; }
/// <summary> /// 构造函数 实现依赖注入 /// </summary> /// <param name="userRepository">仓储对象</param> public TerminalAppService(ITerminalRepository terminalRepository) { _repository = terminalRepository; }
public ProductController(ITerminalRepository repo, ILogger <ProductController> logger) { this.repo = repo; this.logger = logger; }
public TerminalsController(ITerminalRepository repository) { _TermRepo = repository; }
private async static Task UpdateGraph(string notificationLogBaseUrl, string position, INeuronRepository neuronRepository, ITerminalRepository terminalRepository, IRepository <Settings> settingsRepository) { AssertionConcern.AssertStateTrue(long.TryParse(position, out long lastPosition), $"Specified position value of '{position}' is not a valid integer (long)."); AssertionConcern.AssertMinimum(lastPosition, 0, nameof(position)); var eventSourcingUrl = notificationLogBaseUrl + "/"; var notificationClient = new HttpNotificationClient(); // get current log var currentNotificationLog = await notificationClient.GetNotificationLog(eventSourcingUrl, string.Empty); NotificationLog processingEventInfoLog = null; if (lastPosition == StandardNotificationLogClient.StartPosition) { // get first log from current processingEventInfoLog = await notificationClient.GetNotificationLog(eventSourcingUrl, currentNotificationLog.FirstNotificationLogId); } else { processingEventInfoLog = currentNotificationLog; while (lastPosition < processingEventInfoLog.DecodedNotificationLogId.Low) { processingEventInfoLog = await notificationClient.GetNotificationLog(eventSourcingUrl, processingEventInfoLog.PreviousNotificationLogId); } } // while processing logid is not equal to newly retrieved currenteventinfolog while (processingEventInfoLog.DecodedNotificationLogId.Low <= currentNotificationLog.DecodedNotificationLogId.Low) { foreach (Notification e in processingEventInfoLog.NotificationList) { if (e.SequenceId > lastPosition) { var eventName = e.GetEventName(); StandardNotificationLogClient.logger.Info($"Processing event '{eventName}' with Sequence Id-{e.SequenceId.ToString()} for Neuron '{e.Id}"); if (await new EventDataProcessor().Process(neuronRepository, terminalRepository, eventName, e.Data, e.AuthorId)) { // update current position lastPosition = e.SequenceId; if (!processingEventInfoLog.HasNextNotificationLog && processingEventInfoLog.NotificationList.Last() == e) { await settingsRepository.Save( new Settings() { Id = Guid.Empty.ToString(), LastPosition = lastPosition.ToString() } ); } } else { StandardNotificationLogClient.logger.Warn($"Processing failed."); } } } if (processingEventInfoLog.HasNextNotificationLog) { processingEventInfoLog = await notificationClient.GetNotificationLog(eventSourcingUrl, processingEventInfoLog.NextNotificationLogId); } else { break; } } }
public TerminalQueryService(ITerminalRepository terminalRepository) { this.terminalRepository = terminalRepository; }
public ReportGroupController(IReportGroup repo, ITerminalRepository repotn) { _repo = repo; _repotn = repotn; }