예제 #1
0
 public PropertyFile(Gibbed.Spore.Package.DatabaseIndex index)
 {
     byte[] data = index.GetIndexData(true);
     using (Stream s = new MemoryStream(data, 0, data.Length))
     {
         this.Read(s);
     }
 }
예제 #2
0
 public static void WriteToPath(DatabaseIndex element, string path)
 {
     if (string.IsNullOrWhiteSpace(path))
     {
         return;
     }
     using (FileStream fileStream = File.Create(path))
     {
         byte[] data = element.GetIndexData(true);
         fileStream.Write(data, 0, data.Length);
     }
 }