public static DomainConfigList Load(string path) { DomainConfigList domainConfigList; try { XmlSerializer mySerializer = new XmlSerializer(typeof (DomainConfigList)); FileStream myFileStream = new FileStream(path, FileMode.Open, FileAccess.Read); domainConfigList = ((DomainConfigList) (mySerializer.Deserialize(myFileStream))); myFileStream.Close(); } catch (Exception) { domainConfigList = new DomainConfigList() ; } return domainConfigList; }
public static DomainConfigList Load(string path) { DomainConfigList domainConfigList; try { XmlSerializer mySerializer = new XmlSerializer(typeof(DomainConfigList)); FileStream myFileStream = new FileStream(path, FileMode.Open, FileAccess.Read); domainConfigList = ((DomainConfigList)(mySerializer.Deserialize(myFileStream))); myFileStream.Close(); } catch (Exception) { domainConfigList = new DomainConfigList(); } return(domainConfigList); }
private void LoadDomainConfigList() { domainConfigList = DomainConfigList.Load(domainConfigListPath); }
public static void LoadDomainConfigList() { domainConfigList = DomainConfigList.Load(domainConfigListPath); }