Ejemplo n.º 1
0
 private static string ToString(ActivationSet item)
 {
     using (StringWriter sw = new StringWriter()){
         using (ComSpex.XmlPersist <ActivationSet> xp = new ComSpex.XmlPersist <ActivationSet>(item)){
             return(xp.Save(sw));
         }
     }
 }
Ejemplo n.º 2
0
 public static void SaveData(string path)
 {
     lock (actCache){
         ActivationSet[] items = new ActivationSet[actCache.Count];
         actCache.Values.CopyTo(items, 0);
         using (StreamWriter sw = new StreamWriter(path)){
             using (ComSpex.XmlPersist <ActivationSet[]> Xp = new ComSpex.XmlPersist <ActivationSet[]>(items)){
                 Xp.Save(sw);
             }
         }
     }
 }