예제 #1
0
        public SetupConfig GetAllSettings()
        {
            if (!System.IO.File.Exists(Configurationpath))
            {
                return(AllSettings);
            }

            XmlSerializer serializer = new XmlSerializer(typeof(SetupConfig));

            using (FileStream stream = File.OpenRead(Configurationpath))
            {
                var result = (SetupConfig)serializer.Deserialize(stream);
                if (result != null)
                {
                    AllSettings = result;
                }
            }
            return(AllSettings);
        }