Esempio n. 1
0
        private static StreamWriter Save(WorkspaceModel model)
        {
            var persistance = new ModelPersistance();
            var pmod        = persistance.GetPersistantModel(model);

            MemoryStream ms     = new MemoryStream();
            StreamWriter writer = null;

            try
            {
                writer = new StreamWriter(ms, Encoding.UTF8);
                XMLSerialization.XMLSerialization.Serialize(pmod, writer);
                return(writer);
            }
            catch (Exception e)
            {
                throw new NullReferenceException();
            }
        }