static void LoadInfo() { XmlSerializer ser = new XmlSerializer(typeof(ServiceCollection)); string servicesFile = Path.Combine(basePath, "services.xml"); if (!File.Exists(servicesFile)) { services = new ServiceCollection(); } else { StreamReader sr = new StreamReader(servicesFile); services = (ServiceCollection)ser.Deserialize(sr); sr.Close(); } ser = new XmlSerializer(typeof(ServiceStatusCollection)); servicesFile = Path.Combine(basePath, "serviceStatus.xml"); if (!File.Exists(servicesFile)) { serviceStatus = new ServiceStatusCollection(); } else { StreamReader sr = new StreamReader(servicesFile); serviceStatus = (ServiceStatusCollection)ser.Deserialize(sr); sr.Close(); } }
static void LoadInfo () { XmlSerializer ser = new XmlSerializer (typeof(ServiceCollection)); string servicesFile = Path.Combine (basePath, "services.xml"); if (!File.Exists (servicesFile)) services = new ServiceCollection (); else { StreamReader sr = new StreamReader (servicesFile); services = (ServiceCollection) ser.Deserialize (sr); sr.Close (); } ser = new XmlSerializer (typeof(ServiceStatusCollection)); servicesFile = Path.Combine (basePath, "serviceStatus.xml"); if (!File.Exists (servicesFile)) serviceStatus = new ServiceStatusCollection (); else { StreamReader sr = new StreamReader (servicesFile); serviceStatus = (ServiceStatusCollection) ser.Deserialize (sr); sr.Close (); } }