예제 #1
0
        // Token: 0x06001102 RID: 4354 RVA: 0x0001A324 File Offset: 0x00018524
        public static GameApplicationView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            GameApplicationView gameApplicationView = new GameApplicationView();

            if ((num & 1) != 0)
            {
                gameApplicationView.CommServer = PhotonViewProxy.Deserialize(bytes);
            }
            if ((num & 2) != 0)
            {
                gameApplicationView.EncryptionInitVector = StringProxy.Deserialize(bytes);
            }
            if ((num & 4) != 0)
            {
                gameApplicationView.EncryptionPassPhrase = StringProxy.Deserialize(bytes);
            }
            if ((num & 8) != 0)
            {
                gameApplicationView.GameServers = ListProxy <PhotonView> .Deserialize(bytes, new ListProxy <PhotonView> .Deserializer <PhotonView>(PhotonViewProxy.Deserialize));
            }
            if ((num & 16) != 0)
            {
                gameApplicationView.SupportUrl = StringProxy.Deserialize(bytes);
            }
            if ((num & 32) != 0)
            {
                gameApplicationView.Version = StringProxy.Deserialize(bytes);
            }
            return(gameApplicationView);
        }
예제 #2
0
        // Token: 0x060010D8 RID: 4312 RVA: 0x00017FC8 File Offset: 0x000161C8
        public static AuthenticateApplicationView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            AuthenticateApplicationView authenticateApplicationView = new AuthenticateApplicationView();

            if ((num & 1) != 0)
            {
                authenticateApplicationView.CommServer = PhotonViewProxy.Deserialize(bytes);
            }
            if ((num & 2) != 0)
            {
                authenticateApplicationView.EncryptionInitVector = StringProxy.Deserialize(bytes);
            }
            if ((num & 4) != 0)
            {
                authenticateApplicationView.EncryptionPassPhrase = StringProxy.Deserialize(bytes);
            }
            if ((num & 8) != 0)
            {
                authenticateApplicationView.GameServers = ListProxy <PhotonView> .Deserialize(bytes, new ListProxy <PhotonView> .Deserializer <PhotonView>(PhotonViewProxy.Deserialize));
            }
            authenticateApplicationView.IsEnabled  = BooleanProxy.Deserialize(bytes);
            authenticateApplicationView.WarnPlayer = BooleanProxy.Deserialize(bytes);
            return(authenticateApplicationView);
        }
예제 #3
0
        // Token: 0x06001101 RID: 4353 RVA: 0x0001A210 File Offset: 0x00018410
        public static void Serialize(Stream stream, GameApplicationView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                if (instance.CommServer != null)
                {
                    PhotonViewProxy.Serialize(memoryStream, instance.CommServer);
                }
                else
                {
                    num |= 1;
                }
                if (instance.EncryptionInitVector != null)
                {
                    StringProxy.Serialize(memoryStream, instance.EncryptionInitVector);
                }
                else
                {
                    num |= 2;
                }
                if (instance.EncryptionPassPhrase != null)
                {
                    StringProxy.Serialize(memoryStream, instance.EncryptionPassPhrase);
                }
                else
                {
                    num |= 4;
                }
                if (instance.GameServers != null)
                {
                    ListProxy <PhotonView> .Serialize(memoryStream, instance.GameServers, new ListProxy <PhotonView> .Serializer <PhotonView>(PhotonViewProxy.Serialize));
                }
                else
                {
                    num |= 8;
                }
                if (instance.SupportUrl != null)
                {
                    StringProxy.Serialize(memoryStream, instance.SupportUrl);
                }
                else
                {
                    num |= 16;
                }
                if (instance.Version != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Version);
                }
                else
                {
                    num |= 32;
                }
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
예제 #4
0
        // Token: 0x060010D7 RID: 4311 RVA: 0x00017EDC File Offset: 0x000160DC
        public static void Serialize(Stream stream, AuthenticateApplicationView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                if (instance.CommServer != null)
                {
                    PhotonViewProxy.Serialize(memoryStream, instance.CommServer);
                }
                else
                {
                    num |= 1;
                }
                if (instance.EncryptionInitVector != null)
                {
                    StringProxy.Serialize(memoryStream, instance.EncryptionInitVector);
                }
                else
                {
                    num |= 2;
                }
                if (instance.EncryptionPassPhrase != null)
                {
                    StringProxy.Serialize(memoryStream, instance.EncryptionPassPhrase);
                }
                else
                {
                    num |= 4;
                }
                if (instance.GameServers != null)
                {
                    ListProxy <PhotonView> .Serialize(memoryStream, instance.GameServers, new ListProxy <PhotonView> .Serializer <PhotonView>(PhotonViewProxy.Serialize));
                }
                else
                {
                    num |= 8;
                }
                BooleanProxy.Serialize(memoryStream, instance.IsEnabled);
                BooleanProxy.Serialize(memoryStream, instance.WarnPlayer);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }