private void GenerateSignInSheetTableStorage(EventsContext context, Event eventItem)
        {
            string connectionString = CloudConfigurationManager.GetSetting("Microsoft.WindowsAzure.Storage.ConnectionString");
            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
            CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();

            string signInQueueName = WebConfigurationManager.AppSettings["SignInQueueName"];
            CloudQueue queue = queueClient.GetQueueReference(signInQueueName);
            queue.CreateIfNotExists();

            string queueMessage = JsonConvert.SerializeObject(
                new QueueMessage
                {
                    EventId = eventItem.Id,
                    MessageType = QueueMessageType.SignIn
                }
            );

            queue.AddMessage(
                new CloudQueueMessage(queueMessage)
            );

            eventItem.SignInDocumentUrl = PROCESSING_URI;

            context.SaveChanges();

            this.Event = eventItem;

            this.SignInSheetState = SignInSheetState.SignInDocumentProcessing;
        }
        private void GenerateSignInSheetTableStorage(EventsContext context, Event eventItem, string message)
        {
            eventItem.SignInDocumentUrl = PROCESSING_URI;

            context.SaveChanges();

            this.Event = eventItem;

            this.SignInSheetState = SignInSheetState.SignInDocumentProcessing;
        }
        private void GenerateSignInSheetServiceBus(EventsContext context, Event eventItem, QueueMessage message)
        {
            eventItem.SignInDocumentUrl = PROCESSING_URI;

            context.SaveChanges();

            this.Event = eventItem;

            this.SignInSheetState = SignInSheetState.SignInDocumentProcessing;
        }
        private void GenerateSignInSheetServiceBus(EventsContext context, Event eventItem, QueueMessage message)
        {
            QueueClient client = QueueClient.CreateFromConnectionString(serviceBusConnectionString, signInQueueName);

            BrokeredMessage queueMessage = new BrokeredMessage(message);
            client.Send(queueMessage);

            eventItem.SignInDocumentUrl = PROCESSING_URI;

            context.SaveChanges();

            this.Event = eventItem;

            this.SignInSheetState = SignInSheetState.SignInDocumentProcessing;
        }
        private void GenerateSignInSheetTableStorage(EventsContext context, Event eventItem, string message)
        {
            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(tableStorageConnectionString);
            CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();

            CloudQueue queue = queueClient.GetQueueReference(signInQueueName);
            queue.CreateIfNotExists();

            CloudQueueMessage queueMessage = new CloudQueueMessage(message);
            queue.AddMessage(queueMessage);

            eventItem.SignInDocumentUrl = PROCESSING_URI;

            context.SaveChanges();

            this.Event = eventItem;

            this.SignInSheetState = SignInSheetState.SignInDocumentProcessing;
        }
        private void GenerateSignInSheetServiceBus(EventsContext context, Event eventItem)
        {
            string serviceBusConnectionString = WebConfigurationManager.AppSettings["Microsoft.ServiceBus.ConnectionString"];
            string signInQueueName = WebConfigurationManager.AppSettings["SignInQueueName"];
            NamespaceManager namespaceManager = NamespaceManager.CreateFromConnectionString(serviceBusConnectionString);
            QueueClient client = QueueClient.CreateFromConnectionString(serviceBusConnectionString, signInQueueName);
            client.Send(
                new BrokeredMessage(
                    new QueueMessage
                    {
                        EventId = eventItem.Id,
                        MessageType = QueueMessageType.SignIn
                    }
                )
            );

            eventItem.SignInDocumentUrl = PROCESSING_URI;

            context.SaveChanges();

            this.Event = eventItem;

            this.SignInSheetState = SignInSheetState.SignInDocumentProcessing;
        }