Beispiel #1
0
        public async Task CreateQueueWriter(PlayerType playerType, QueueData queueData = null)
        {
            if (StaticResources.user.type == PlayerType.Host)
            {
                await QueueListner.DisconnectFromQueue();
            }

            if (QueueWriter != null)
            {
                await QueueWriter.DisconnectFromQueue();
            }

            QueueTypes queueTypes = new QueueTypes();

            QueueData writerData = queueData;

            if (playerType == PlayerType.Guest)
            {
                string queueName = "Join-" + StaticResources.sessionCode;
                writerData                       = new QueueData();
                writerData.queueName             = queueName;
                writerData.QueueConnectionString = ServiceBusData.ConnectionString;
            }

            // pass over connection data
            QueueWriter = new QueueWriterHandler(writerData);
        }
Beispiel #2
0
        public async Task DeleteListnerQueue()
        {
            await QueueListner.DisconnectFromQueue();

            string queueName = QueueListner.QueueData.queueName;

            QueueManipulator.DeleteQueue(queueName);
        }