示例#1
0
 public SyncController(
     ILoggerFactory loggerFactory,
     IEventService eventService,
     IEventConferenceDayService eventConferenceDayService,
     IEventConferenceRoomService eventConferenceRoomService,
     IEventConferenceTrackService eventConferenceTrackService,
     IKnowledgeGroupService knowledgeGroupService,
     IKnowledgeEntryService knowledgeEntryService,
     IImageService imageService,
     IDealerService dealerService,
     IAnnouncementService announcementService,
     IMapService mapService
     )
 {
     _logger = loggerFactory.CreateLogger(GetType());
     _eventConferenceTrackService = eventConferenceTrackService;
     _eventConferenceRoomService  = eventConferenceRoomService;
     _eventConferenceDayService   = eventConferenceDayService;
     _eventService          = eventService;
     _knowledgeGroupService = knowledgeGroupService;
     _knowledgeEntryService = knowledgeEntryService;
     _imageService          = imageService;
     _dealerService         = dealerService;
     _announcementService   = announcementService;
     _mapService            = mapService;
 }
 public LinkFragmentValidator(
     IDealerService dealerService,
     IEventConferenceRoomService eventConferenceRoomService,
     IMapService mapService)
 {
     _dealerService = dealerService;
     _eventConferenceRoomService = eventConferenceRoomService;
     _mapService = mapService;
 }
        public BotManager(
            TelegramConfiguration telegramConfiguration,
            IUserManager userManager,
            IDealerService dealerService,
            IEventService eventService,
            IEventConferenceRoomService eventConferenceRoomService,
            IRegSysAlternativePinAuthenticationProvider regSysAlternativePinAuthenticationProvider,
            IEntityRepository <PushNotificationChannelRecord> pushNotificationChannelRepository,
            IEntityRepository <FursuitBadgeRecord> fursuitBadgeRepository,
            IPrivateMessageService privateMessageService,
            ICollectingGameService collectingGameService,
            ConventionSettings conventionSettings,
            ILoggerFactory loggerFactory,
            ITelegramMessageBroker telegramMessageBroker
            )
        {
            _logger        = loggerFactory.CreateLogger(GetType());
            _userManager   = userManager;
            _dealerService = dealerService;
            _eventService  = eventService;
            _eventConferenceRoomService = eventConferenceRoomService;
            _regSysAlternativePinAuthenticationProvider = regSysAlternativePinAuthenticationProvider;
            _pushNotificationChannelRepository          = pushNotificationChannelRepository;
            _fursuitBadgeRepository = fursuitBadgeRepository;
            _privateMessageService  = privateMessageService;
            _collectingGameService  = collectingGameService;
            _conventionSettings     = conventionSettings;
            _telegramMessageBroker  = telegramMessageBroker;

            _botClient =
                string.IsNullOrEmpty(telegramConfiguration.Proxy)
                    ? new TelegramBotClient(telegramConfiguration.AccessToken)
                    : new TelegramBotClient(telegramConfiguration.AccessToken,
                                            new MiniProxy(telegramConfiguration.Proxy));

            _conversationManager = new ConversationManager(
                loggerFactory,
                _botClient,
                (chatId) => new AdminConversation(
                    _userManager,
                    _regSysAlternativePinAuthenticationProvider,
                    _pushNotificationChannelRepository,
                    _fursuitBadgeRepository,
                    privateMessageService,
                    _collectingGameService,
                    _conventionSettings,
                    loggerFactory
                    )
                );

            _botClient.OnMessage       += BotClientOnOnMessage;
            _botClient.OnCallbackQuery += BotClientOnOnCallbackQuery;

            _botClient.OnInlineQuery += BotClientOnOnInlineQuery;

            _telegramMessageBroker.OnSendMarkdownMessageToChatAsync += _telegramMessageBroker_OnSendMarkdownMessageToChatAsync;
        }
 public CsvFileImporter(
     IEventService eventService,
     IEventConferenceDayService eventConferenceDayService,
     IEventConferenceRoomService eventConferenceRoomService,
     IEventConferenceTrackService eventConferenceTrackService
     )
 {
     _eventService = eventService;
     _eventConferenceDayService   = eventConferenceDayService;
     _eventConferenceRoomService  = eventConferenceRoomService;
     _eventConferenceTrackService = eventConferenceTrackService;
 }
示例#5
0
        public CsvFileImporter(
            IEventService eventService,
            IEventConferenceDayService eventConferenceDayService,
            IEventConferenceRoomService eventConferenceRoomService,
            IEventConferenceTrackService eventConferenceTrackService
            )
        {
            _eventService = eventService;
            _eventConferenceDayService   = eventConferenceDayService;
            _eventConferenceRoomService  = eventConferenceRoomService;
            _eventConferenceTrackService = eventConferenceTrackService;

            DateTimeOffset = TimeSpan.Zero;
        }
示例#6
0
 public EventsCommand(
     IEventService eventService,
     IEventConferenceDayService eventConferenceDayService,
     IEventConferenceRoomService eventConferenceRoomService,
     IEventConferenceTrackService eventConferenceTrackService,
     IImageService imageService
     )
 {
     _eventService = eventService;
     _eventConferenceDayService   = eventConferenceDayService;
     _eventConferenceRoomService  = eventConferenceRoomService;
     _eventConferenceTrackService = eventConferenceTrackService;
     _imageService = imageService;
 }
示例#7
0
 public SyncController(
     IEventService eventService,
     IEventConferenceDayService eventConferenceDayService,
     IEventConferenceRoomService eventConferenceRoomService,
     IEventConferenceTrackService eventConferenceTrackService,
     IKnowledgeGroupService knowledgeGroupService,
     IKnowledgeEntryService knowledgeEntryService
     )
 {
     _eventConferenceTrackService = eventConferenceTrackService;
     _eventConferenceRoomService  = eventConferenceRoomService;
     _eventConferenceDayService   = eventConferenceDayService;
     _eventService          = eventService;
     _knowledgeGroupService = knowledgeGroupService;
     _knowledgeEntryService = knowledgeEntryService;
 }
示例#8
0
        public static List <EventConferenceRoomRecord> UpdateEventConferenceRooms(
            IList <string> importConferenceRooms,
            IEventConferenceRoomService service
            )
        {
            var eventConferenceRoomRecords = service.FindAllAsync().Result;

            var patch = new PatchDefinition <string, EventConferenceRoomRecord>(
                (source, list) => list.SingleOrDefault(a => a.Name == source)
                );

            patch.Map(s => s, t => t.Name);
            var diff = patch.Patch(importConferenceRooms, eventConferenceRoomRecords);

            service.ApplyPatchOperationAsync(diff).Wait();

            return(diff.Where(a => a.Entity.IsDeleted == 0).Select(a => a.Entity).ToList());
        }
 public EventConferenceRoomsController(IEventConferenceRoomService eventConferenceRoomService)
 {
     _eventConferenceRoomService = eventConferenceRoomService;
 }