static void Main(string[] args) { // Configure Log4Net var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()); XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config")); log.Info("NetworkManager Topology Builder Starting"); using (var connection = new OracleConnection(ConfigurationManager.ConnectionStrings["OMS"].ConnectionString)) { connection.Open(); var topology = new NetworkTopology(); var deviceTypes = LoadDeviceTypes(connection); topology.Add(LoadDevices(connection, deviceTypes)); topology.Connect(LoadEdges(connection)); topology.EnergizeNetwork(); using (var fs = new FileStream(ConfigurationManager.AppSettings["NetworkTopologyPath"], FileMode.Create)) { topology.Save(fs); } } }