public static async Task ResetData() { await program.topic.DisconnectFromTopic(); //if (StaticResources.user.type == PlayerType.Host) //{ // await program.DeleteTopic(); //} await program.QueueListner.DisconnectFromQueue(); program = null; }
public async static Task InitiateServiceBusHandler(Player player, bool host = false) { // create new instance of program program = new ServiceBus.Program(player); // if player is host, create new topic to play the game in if (host) { // add host to the player list StaticResources.PlayerList.Add(StaticResources.user); // create new topic with subscriptions await program.CreateNewTopic(); } }