Exemplo n.º 1
0
        public static async Task <ITableStorageRepository <Vote> > GetRepositoryAsync(this VotingConfig config)
        {
            var repo = new TableStorageRepository <Vote>(CloudStorageAccount.Parse(config.ConnectionString), config.Table);
            await repo.InitializeAsync();

            return(repo);
        }
Exemplo n.º 2
0
        public static async Task <ITableStorageRepository <NotifiedSessionEntity> > GetRepositoryAsync(this NewSessionNotificationConfig config)
        {
            var repo = new TableStorageRepository <NotifiedSessionEntity>(CloudStorageAccount.Parse(config.ConnectionString), config.Table);
            await repo.InitializeAsync();

            return(repo);
        }
Exemplo n.º 3
0
        private static async Task <(ITableStorageRepository <SessionEntity>, ITableStorageRepository <PresenterEntity>)> GetSessionRepositoryAsync(string connectionString, string sessionsTable, string presentersTable)
        {
            var storageAccount = CloudStorageAccount.Parse(connectionString);
            var sessionsRepo   = new TableStorageRepository <SessionEntity>(storageAccount, sessionsTable);
            var presentersRepo = new TableStorageRepository <PresenterEntity>(storageAccount, presentersTable);
            await sessionsRepo.InitializeAsync();

            await presentersRepo.InitializeAsync();

            return(sessionsRepo, presentersRepo);
        }
Exemplo n.º 4
0
        public static async Task <(ITableStorageRepository <ConferenceFeedbackEntity>, ITableStorageRepository <SessionFeedbackEntity>)> GetRepositoryAsync(this FeedbackConfig feedback)
        {
            var storageAccount = CloudStorageAccount.Parse(feedback.ConnectionString);
            var conferenceFeedbackRepository = new TableStorageRepository <ConferenceFeedbackEntity>(storageAccount, feedback.ConferenceFeedbackTable);
            var sessionFeedbackRepository    = new TableStorageRepository <SessionFeedbackEntity>(storageAccount, feedback.SessionFeedbackTable);
            await conferenceFeedbackRepository.InitializeAsync();

            await sessionFeedbackRepository.InitializeAsync();

            return(conferenceFeedbackRepository, sessionFeedbackRepository);
        }
Exemplo n.º 5
0
        public static async Task <(ITableStorageRepository <DedupeWebhookEntity>, IQueueStorageRepository <OrderNotificationEvent>, IQueueStorageRepository <TicketNotificationEvent>)> GetRepositoryAsync(this TitoWebhookConfig config)
        {
            var storageAccount          = CloudStorageAccount.Parse(config.ConnectionString);
            var deDupeRepository        = new TableStorageRepository <DedupeWebhookEntity>(storageAccount, config.DeDupeTable);
            var orderNotificationQueue  = new QueueStorageRepository <OrderNotificationEvent>(storageAccount, config.OrderNotificationQueue);
            var ticketNotificationQueue = new QueueStorageRepository <TicketNotificationEvent>(storageAccount, config.TicketNotificationQueue);
            await deDupeRepository.InitializeAsync();

            await orderNotificationQueue.InitializeAsync();

            await ticketNotificationQueue.InitializeAsync();

            return(deDupeRepository, orderNotificationQueue, ticketNotificationQueue);
        }