public object Deserialize(
            StreamReader streamReader,
            SerializationContext serializationContext,
            PropertyMetaData propertyMetaData = null)
        {
            var identityType = (IdentityType)streamReader.ReadInt32();

            if (identityType != IdentityType.VendingMachine)
            {
                streamReader.Position = streamReader.Position - 4;
                return(null);
            }

            var playfieldVendorInfo = new PlayfieldVendorInfo
            {
                Unknown1 =
                    new Identity
                {
                    Type     = identityType,
                    Instance = streamReader.ReadInt32()
                },
                Unknown2      = streamReader.ReadInt32(),
                VendorCount   = streamReader.ReadInt32(),
                FirstVendorId = streamReader.ReadInt32()
            };

            return(playfieldVendorInfo);
        }
        public object Deserialize(
            StreamReader streamReader, 
            SerializationContext serializationContext, 
            PropertyMetaData propertyMetaData = null)
        {
            var identityType = (IdentityType)streamReader.ReadInt32();
            if (identityType != IdentityType.VendingMachine)
            {
                streamReader.Position = streamReader.Position - 4;
                return null;
            }

            var playfieldVendorInfo = new PlayfieldVendorInfo
                                          {
                                              Unknown1 =
                                                  new Identity
                                                      {
                                                          Type = identityType, 
                                                          Instance = streamReader.ReadInt32()
                                                      }, 
                                              Unknown2 = streamReader.ReadInt32(), 
                                              VendorCount = streamReader.ReadInt32(), 
                                              FirstVendorId = streamReader.ReadInt32()
                                          };
            return playfieldVendorInfo;
        }