{"action":"created","issue":{"url":"https://api.github.com/repos/RickStrahl/Westwind.ApplicationConfiguration/issues/13","labels_url":"https://api.github.com/repos/RickStrahl/Westwind.ApplicationConfiguration/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/RickStrahl/Westwind.ApplicationConfiguration/issues/13/comments","events_url":"https://api.github.com/repos/RickStrahl/Westwind.ApplicationConfiguration/issues/13/events","html_url":"https://github.com/RickStrahl/Westwind.ApplicationConfiguration/issues/13","id":64510770,"number":13,"title":"IList<string> type always overrides values in config file","user":{"login":"sashazjukov","id":3774787,"avatar_url":"https://avatars.githubusercontent.com/u/3774787?v=3","gravatar_id":"","url":"https://api.github.com/users/sashazjukov","html_url":"https://github.com/sashazjukov","followers_url":"https://api.github.com/users/sashazjukov/followers","following_url":"https://api.github.com/users/sashazjukov/following{/other_user}","gists_url":"https://api.github.com/users/sashazjukov/gists{/gist_id}","starred_url":"https://api.github.com/users/sashazjukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sashazjukov/subscriptions","organizations_url":"https://api.github.com/users/sashazjukov/orgs","repos_url":"https://api.github.com/users/sashazjukov/repos","events_url":"https://api.github.com/users/sashazjukov/events{/privacy}","received_events_url":"https://api.github.com/users/sashazjukov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-26T12:09:19Z","updated_at":"2015-03-27T10:34:05Z","closed_at":null,"body":"Using Interface IList in property declaration will force overriding List values in config files.\r\npublic IList<string> ServerList { get; set;  }"},"comment":{"url":"https://api.github.com/repos/RickStrahl/Westwind.ApplicationConfiguration/issues/comments/86896251","html_url":"https://github.com/RickStrahl/Westwind.ApplicationConfiguration/issues/13#issuecomment-86896251","issue_url":"https://api.github.com/repos/RickStrahl/Westwind.ApplicationConfiguration/issues/13","id":86896251,"user":{"login":"sashazjukov","id":3774787,"avatar_url":"https://avatars.githubusercontent.com/u/3774787?v=3","gravatar_id":"","url":"https://api.github.com/users/sashazjukov","html_url":"https://github.com/sashazjukov","followers_url":"https://api.github.com/users/sashazjukov/followers","following_url":"https://api.github.com/users/sashazjukov/following{/other_user}","gists_url":"https://api.github.com/users/sashazjukov/gists{/gist_id}","starred_url":"https://api.github.com/users/sashazjukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sashazjukov/subscriptions","organizations_url":"https://api.github.com/users/sashazjukov/orgs","repos_url":"https://api.github.com/users/sashazjukov/repos","events_url":"https://api.github.com/users/sashazjukov/events{/privacy}","received_events_url":"https://api.github.com/users/sashazjukov/received_events","type":"User","site_admin":false},"created_at":"2015-03-27T10:34:05Z","updated_at":"2015-03-27T10:34:05Z","body":"in the example below use IList instead of List, and in the output config file you will not be able to change values of these keys:\r\n<add key=\"ServerList1\" value=\"DevServer\" />\r\n<add key=\"ServerList2\" value=\"Maximus\" />\r\n<add key=\"ServerList3\" value=\"Tempest\" />\r\nOn every start the application will override values of ServerList in the output config file with values defined in constructor.\r\n\r\npublic class CustomConfigFileConfiguration : Westwind.Utilities.Configuration.AppConfiguration\r\n{\r\n        public string ApplicationName { get; set; }\r\n        public IList<string> ServerList { get; set;  } //  <---- IList instead of List\r\n\r\n        public CustomConfigFileConfiguration()\r\n        {\r\n            ApplicationName = \"Configuration Tests\";\r\n            ServerList = new List<string>()\r\n            {\r\n                \"DevServer\",\r\n                \"Maximus\",\r\n                \"Tempest\"\r\n            };\r\n        }\r\n}\r\n"}}