Exemplo n.º 1
0
        public static void Encode(string fileName, IEncodable value)
        {
            FileStream stream = File.Open(fileName, FileMode.Create);

            EncoderUtil.Encode(stream, value);

            stream.Close();
        }
Exemplo n.º 2
0
 public static T Decode <T>(string fileName, GraphicsDevice graphicsDevice) where T : IEncodable, new()
 {
     using (FileStream stream = File.Open(fileName, FileMode.Open)) {
         return(EncoderUtil.Decode <T>(stream, graphicsDevice));
     }
 }