OpenHome.Songcast.Configuration.SetPath C# (CSharp) Method

SetPath() private method

private SetPath ( string aPath ) : void
aPath string
return void
        private void SetPath(string aPath)
        {
            iPath = aPath;
        }

Usage Example

        public static Configuration Load()
        {
            XmlSerializer xml = new XmlSerializer(typeof(Configuration));

            string common = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
            string folder = Path.Combine(common, "ohSongcast");

            if (!Directory.Exists(folder))
            {
                Directory.CreateDirectory(folder);
            }

            string path = Path.Combine(folder, "Configuration.xml");

            if (!File.Exists(path))
            {
                return(New(path));
            }

            try
            {
                using (TextReader reader = new StreamReader(path))
                {
                    Configuration configuration = (Configuration)xml.Deserialize(reader);
                    configuration.SetPath(path);
                    return(configuration);
                }
            }
            catch (Exception)
            {
                return(New(path));
            }
        }
All Usage Examples Of OpenHome.Songcast.Configuration::SetPath