Esempio n. 1
0
        static async Task <IEnumerable <string> > GetRegions(string buildID)
        {
            var req = new PlayFab.MultiplayerModels.GetBuildRequest();

            req.BuildId = buildID;
            var res = await PlayFabMultiplayerAPI.GetBuildAsync(req);

            if (res.Error != null)
            {
                Console.WriteLine(res.Error.ErrorMessage);
                return(new string[] { });
            }
            else
            {
                return(res.Result.RegionConfigurations.Select(x => x.Region));
            }
        }
Esempio n. 2
0
        static async Task GetBuild()
        {
            var req = new PlayFab.MultiplayerModels.GetBuildRequest();

            Console.WriteLine("Enter BuildID");
            string buildID = Console.ReadLine();

            req.BuildId = buildID;
            var res = await PlayFabMultiplayerAPI.GetBuildAsync(req);

            if (res.Error != null)
            {
                Console.WriteLine(res.Error.ErrorMessage);
            }
            else
            {
                PrettyPrintJson(res.Result);
            }
        }