Exemple #1
0
 public static void Save(CRoot root, string Path)
 {
     root.ClearContent();
     using (FileStream fs = new FileStream(Path, FileMode.Create))
     {
         BinaryFormatter formatter = new BinaryFormatter();
         formatter.Serialize(fs, root);
     }
 }
Exemple #2
0
 public static void Save(CRoot root)
 {
     root.ClearContent();
     using (FileStream fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + "Data.dat", FileMode.Create))
     {
         BinaryFormatter formatter = new BinaryFormatter();
         formatter.Serialize(fs, root);
     }
 }
 public SearchEngine(CRoot root, SearchPosition sp, string keyword)
 {
     Root    = root;
     SP      = sp;
     Keyword = keyword;
 }