示例#1
0
        public override string ToJson()
        {
            Serializer serializer = Serializer.Start();

            serializer.AddString("playerId", base.PlayerId);
            if (this.LocalePreference != null)
            {
                serializer.AddString("locale", this.LocalePreference);
            }
            if (this.DeviceToken != null)
            {
                serializer.AddString("deviceToken", this.DeviceToken);
            }
            serializer.AddString("deviceType", "f");
            serializer.Add <double>("timeZoneOffset", this.TimeZoneOffset);
            EnvironmentController environmentController = Service.Get <EnvironmentController>();

            serializer.AddString("clientVersion", "4.7.0.2");
            serializer.AddString("model", environmentController.GetModel());
            serializer.AddString("os", environmentController.GetOS());
            serializer.AddString("osVersion", environmentController.GetOSVersion());
            serializer.AddString("platform", environmentController.GetPlatform());
            serializer.AddString("sessionId", Service.Get <ServerAPI>().SessionId);
            serializer.AddString("deviceId", environmentController.GetDeviceIDForEvent2());
            serializer.AddString("deviceIdType", environmentController.GetDeviceIdType());
            return(serializer.End().ToString());
        }
示例#2
0
        private void SetupSantardizedData()
        {
            this.headers.Clear();
            this.headers["Authorization"] = "FD B63762CD-C185-4CBF-9798-448A7AE79C7E:CD515CAC9CFE3C0C4FB05F7D7ED514B17AA3B9A0D8184337";
            this.headers["Expect"]        = string.Empty;
            this.headers["Content-Type"]  = "application/json";
            this.guest = Serializer.Start();
            if (Service.IsSet <CurrentPlayer>())
            {
                this.guest.AddString("ply", Service.Get <CurrentPlayer>().PlayerId);
            }
            else
            {
                string @string = PlayerPrefs.GetString("prefPlayerId", "u");
                this.guest.AddString("ply", @string);
            }
            this.guest.End();
            if (!Service.IsSet <EnvironmentController>() || !Service.IsSet <ServerAPI>())
            {
                return;
            }
            EnvironmentController environmentController = Service.Get <EnvironmentController>();

            this.app = new Dictionary <string, string>();
            this.app.Add("p", environmentController.GetPlatform());
            this.app.Add("v", "4.7.0.2");
            this.app.Add("llv", "2.0");
            this.app.Add("n", "qa_starts");
            this.session = new Dictionary <string, string>();
            this.session.Add("lo", environmentController.GetLocale());
            this.session.Add("id", Service.Get <ServerAPI>().SessionId);
            this.device = new Dictionary <string, string>();
            this.device.Add("mo", environmentController.GetModel());
            this.device.Add("ov", environmentController.GetOSVersion());
            this.device.Add("idt", environmentController.GetDeviceIdType());
            this.device.Add("id", environmentController.GetDeviceIDForEvent2());
            this.device.Add("ua", SystemInfo.operatingSystem);
            this.device.Add("m", environmentController.GetMachine());
            this.device.Add("o", environmentController.GetOS());
        }
示例#3
0
        private void SetupSantardizedData()
        {
            this.headers.Clear();
            this.headers["Authorization"] = "FD B276DCA8-9CD5-4493-85D6-75D2E500BCC9:19042B0A0628EF36039165C24A240F78F6EDBDFB8BD86BA3";
            this.headers["Content-Type"]  = "application/json";
            this.guest = Serializer.Start();
            if (Service.CurrentPlayer != null)
            {
                this.guest.AddString("ply", Service.CurrentPlayer.PlayerId);
            }
            else
            {
                string @string = PlayerPrefs.GetString("prefPlayerId", "u");
                this.guest.AddString("ply", @string);
            }
            this.guest.End();
            if (Service.EnvironmentController == null || Service.ServerAPI == null)
            {
                return;
            }
            EnvironmentController environmentController = Service.EnvironmentController;

            this.app = new Dictionary <string, string>();
            this.app.Add("p", environmentController.GetPlatform());
            this.app.Add("v", "6.0.0.10394");
            this.app.Add("llv", "2.0");
            this.app.Add("n", "starts");
            this.session = new Dictionary <string, string>();
            this.session.Add("lo", environmentController.GetLocale());
            this.session.Add("id", Service.ServerAPI.SessionId);
            this.device = new Dictionary <string, string>();
            this.device.Add("mo", environmentController.GetModel());
            this.device.Add("ov", environmentController.GetOSVersion());
            this.device.Add("idt", environmentController.GetDeviceIdType());
            this.device.Add("id", environmentController.GetDeviceIDForEvent2());
            this.device.Add("ua", SystemInfo.operatingSystem);
            this.device.Add("m", environmentController.GetMachine());
            this.device.Add("o", environmentController.GetOS());
        }