private static void SaveSamplingWeightsToFile(FileInfo file, int segment)
 {
     using (FileStream stream = file.Open(FileMode.Create, FileAccess.Write, FileShare.Read)) {
         SegmentZoneFormatter.Serialize(stream, Global.SegmentZones[segment]);
     }
 }
 private static SegmentZone[] LoadSamplingWeightsFromFile(FileInfo file)
 {
     using (FileStream stream = file.Open(FileMode.Open, FileAccess.Read, FileShare.Read)) {
         return(SegmentZoneFormatter.Deserialize(stream));
     }
 }