Esempio n. 1
0
 /// <summary>
 ///     Saves an OutputMap to a file.
 /// </summary>
 /// <param name="outputFile">
 ///     a FileInfo object pointing to a file that
 ///     the output map should be saved to
 /// </param>
 /// <param name="map">an OutputMap object to serialize</param>
 public static void Save(FileInfo outputFile, OutputMap map)
 {
     using (var fs = outputFile.OpenWrite())
     {
         var serializer = new BinaryFormatter();
         serializer.Serialize(fs, map);
         fs.Close();
     }
 }
Esempio n. 2
0
 /// <summary>
 ///     Creates a Mediator using a specific output map.
 /// </summary>
 /// <param name="parentForm">A reference to the main Windows Form hosting the application creating this Mediator.</param>
 /// <param name="map">An OutputMap object containing an output map definition to use during mediation.</param>
 public Mediator(OutputMap map, Control parentForm) : this(parentForm)
 {
     _map = map;
 }