/// <summary>
        /// 序列化 PlayObject 对象
        /// </summary>
        /// <returns>The play object.</returns>
        /// <param name="playObject">PlayObject 对象</param>
        public static byte[] SerializePlayObject(PlayObject playObject)
        {
            if (playObject == null)
            {
                return(null);
            }
            var collection = new GenericCollection();

            foreach (var entry in playObject)
            {
                collection.MapEntryValue.Add(new GenericCollection.Types.MapEntry {
                    Key = entry.Key as string,
                    Val = Serialize(entry.Value)
                });
            }
            return(collection.ToByteArray());
        }