Showing the changes to Source/Tools/DNP3ConfigGenerator/Program.cs (1 of 5 files). Show all
Unified · Split
| @@ -0,0 +1,31 @@ | |||
| 1 | using System; | ||
| 2 | using System.Collections.Generic; | ||
| 3 | using System.Linq; | ||
| 4 | using System.Text; | ||
| 5 | using System.Threading.Tasks; | ||
| 6 | |||
| 7 | using System.IO; | ||
| 8 | using System.Xml.Serialization; | ||
| 9 | |||
| 10 | using DNP3Adapters; | ||
| 11 | |||
| 12 | namespace DNP3ConfigGenerator | ||
| 13 | { | ||
| 14 | class Program | ||
| 15 | { | ||
| 16 | static void Main(string[] args) | ||
| 17 | { | ||
| 18 | var ser = new XmlSerializer(typeof(MasterConfiguration)); | ||
| 19 | var stream = new StreamWriter("device.xml"); | ||
| 20 | try | ||
| 21 | { | ||
| 22 | var config = new MasterConfiguration(); | ||
| 23 | ser.Serialize(stream, config); | ||
| 24 | } | ||
| 25 | finally | ||
| 26 | { | ||
| 27 | stream.Close(); | ||
| 28 | } | ||
| 29 | } | ||
| 30 | } | ||
| 31 | } | ||