public static AWSEnvironments ReadFile(string file)
        {
            var serializer = new AWSEnvironmentsSerializer();

            try
            {
                string xml;
                using (var reader = new StreamReader(file))
                {
                    xml = reader.ReadToEnd();
                    reader.Close();
                }

                return(serializer.Deserialize(xml));
            }
            catch (Exception ex)
            {
                Logger.Log(LogLevel.Error, ex, "Exception in ReadFile()");
            }

            return(new AWSEnvironments());
        }
        public static bool WriteFile(string file, AWSEnvironments config)
        {
            var serializer = new AWSEnvironmentsSerializer();

            try
            {
                var xml = serializer.Serialize(config).OuterXml;
                using (var writer = new StreamWriter(file, false))
                {
                    writer.Write(xml);
                    writer.Flush();
                    writer.Close();
                }

                return(true);
            }
            catch (Exception ex)
            {
                Logger.Log(LogLevel.Error, ex, "Exception in WriteFile()");
            }

            return(false);
        }
        public static bool WriteFile(string file, AWSEnvironments config)
        {
            var serializer = new AWSEnvironmentsSerializer();

            try
            {
                var xml = serializer.Serialize(config).OuterXml;
                using (var writer = new StreamWriter(file, false))
                {
                    writer.Write(xml);
                    writer.Flush();
                    writer.Close();
                }

                return true;
            }
            catch (Exception ex)
            {
                Logger.Log(LogLevel.Error, ex, "Exception in WriteFile()");
            }

            return false;
        }
        public static AWSEnvironments ReadFile(string file)
        {
            var serializer = new AWSEnvironmentsSerializer();

            try
            {
                string xml;
                using (var reader = new StreamReader(file))
                {
                    xml = reader.ReadToEnd();
                    reader.Close();
                }

                return serializer.Deserialize(xml);
            }
            catch (Exception ex)
            {
                Logger.Log(LogLevel.Error, ex, "Exception in ReadFile()");
            }

            return new AWSEnvironments();
        }