示例#1
0
        public static string SaveScript(ClassCollection cc)
        {
            EnsureClassCollectionSerializer();
            var writer = new StringWriter();

            ccSerializer.Serialize(writer, cc);
            return(writer.ToString());
        }
示例#2
0
 public static void SaveScript(ClassCollection cc, string filename)
 {
     EnsureClassCollectionSerializer();
     using (var stream = File.Create(filename)) {
         ccSerializer.Serialize(stream, cc);
         stream.Flush();
         stream.Close();
     }
 }
示例#3
0
 public static void SaveScript(ClassCollection cc, Stream stream)
 {
     EnsureClassCollectionSerializer();
     ccSerializer.Serialize(stream, cc);
 }