Serialize() публичный Метод

public Serialize ( object obj ) : byte[]
obj object
Результат byte[]
Пример #1
0
        public void SaveGame()
        {
            //   if (!NeedsSave)
            //       return;
            var gameSerializer = new Octgn.DataNew.GameSerializer();

            gameSerializer.Serialize(Game);
            var setSerializer = new Octgn.DataNew.SetSerializer()
            {
                Game = Game
            };

            foreach (Set set in this.Sets)
            {
                setSerializer.Serialize(set);
            }
            var scriptSerializer = new Octgn.DataNew.GameScriptSerializer(Game.Id)
            {
                Game = Game
            };

            foreach (GameScript script in this.Scripts)
            {
                scriptSerializer.Serialize(script);
            }
            var proxySerializer = new Octgn.DataNew.ProxyGeneratorSerializer(Game.Id)
            {
                Game = Game
            };

            proxySerializer.Serialize(ProxyDef);
            NeedsSave     = false;
            DidManualSave = true;
        }
Пример #2
0
        public void SaveGame()
        {
            //   if (!NeedsSave)
            //       return;
            var g = new Octgn.DataNew.GameSerializer();

            g.Serialize(Game);
            var s = new Octgn.DataNew.SetSerializer();

            foreach (Set set in this.Sets)
            {
                s.Serialize(set);
            }
            NeedsSave     = false;
            DidManualSave = true;
        }