{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Options/issues/122","repository_url":"https://api.github.com/repos/aspnet/Options","labels_url":"https://api.github.com/repos/aspnet/Options/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Options/issues/122/comments","events_url":"https://api.github.com/repos/aspnet/Options/issues/122/events","html_url":"https://github.com/aspnet/Options/issues/122","id":136819339,"number":122,"title":"Removing IOptions<T>","user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-26T21:29:25Z","updated_at":"2016-02-26T21:29:25Z","closed_at":null,"body":"Summary of planned options changes:\r\n\r\n1. Removing `IOptions<T>` entirely, Options must be registered as services (updating all middleware/frameworks)\r\n2. `AddOptions<T>` sugar which registers an options as a singleton:\r\n\r\n```\r\n            services.AddSingleton(s => {\r\n                var o = new OptionsHao();\r\n                foreach (var c in s.GetRequiredService<IEnumerable<IConfigureOptions<OptionsHao>>>())\r\n                    c.Configure(o);\r\n                return o;\r\n            });\r\n```\r\n3.  Our framework options will not use this sugar, but will switch to ctor's taking `IEnumerable<IConfigureOptions<T>>` (with potentially a new base Options<T> class)\r\n\r\ncc @divega @lodejard @davidfowl"}}