{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/2135","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/2135/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/2135/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/2135/events","html_url":"https://github.com/aspnet/Mvc/pull/2135","id":60074060,"number":2135,"title":"[Design]: Proposal for more generic tag helper configuration feature","user":{"login":"DamianEdwards","id":249088,"avatar_url":"https://avatars.githubusercontent.com/u/249088?v=3","gravatar_id":"","url":"https://api.github.com/users/DamianEdwards","html_url":"https://github.com/DamianEdwards","followers_url":"https://api.github.com/users/DamianEdwards/followers","following_url":"https://api.github.com/users/DamianEdwards/following{/other_user}","gists_url":"https://api.github.com/users/DamianEdwards/gists{/gist_id}","starred_url":"https://api.github.com/users/DamianEdwards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DamianEdwards/subscriptions","organizations_url":"https://api.github.com/users/DamianEdwards/orgs","repos_url":"https://api.github.com/users/DamianEdwards/repos","events_url":"https://api.github.com/users/DamianEdwards/events{/privacy}","received_events_url":"https://api.github.com/users/DamianEdwards/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Mvc/labels/cla-not-required","name":"cla-not-required","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-06T08:40:26Z","updated_at":"2015-03-06T15:35:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aspnet/Mvc/pulls/2135","html_url":"https://github.com/aspnet/Mvc/pull/2135","diff_url":"https://github.com/aspnet/Mvc/pull/2135.diff","patch_url":"https://github.com/aspnet/Mvc/pull/2135.patch"},"body":"@davidfowl and I came up with this as an alternative to creating separate options objects for tag helpers. Means you can very simply add default configuration for any tag helper without the need for an options object by just setting the properties directly from your config delegate. Properties set from source CSHTML still win. e.g. \r\n\r\n``` C#\r\nservices.ConfigureTagHelper<FormTagHelper>((form, viewContext) => form.AntiForgery = false);\r\nservices.ConfigureTagHelper<CacheTagHelper>((cache, viewContext) =>\r\n{\r\n    // Set default caching expiration to sliding 5 minutes\r\n    cache.ExpiresAfter = TimeSpan.FromMinutes(5);\r\n});\r\n```\r\n\r\n- Doesn't use IOptions\r\n- Any Action<ITagHelper, ViewContext> can be registered in DI to allow setting of tag helper properties before their bound from the source document and the tag helper is executed\r\n- #1689\r\n\r\n@NTaylorMullen @dougbu @Eilon "},"comment":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/77578350","html_url":"https://github.com/aspnet/Mvc/pull/2135#issuecomment-77578350","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/2135","id":77578350,"user":{"login":"dougbu","id":6431421,"avatar_url":"https://avatars.githubusercontent.com/u/6431421?v=3","gravatar_id":"","url":"https://api.github.com/users/dougbu","html_url":"https://github.com/dougbu","followers_url":"https://api.github.com/users/dougbu/followers","following_url":"https://api.github.com/users/dougbu/following{/other_user}","gists_url":"https://api.github.com/users/dougbu/gists{/gist_id}","starred_url":"https://api.github.com/users/dougbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougbu/subscriptions","organizations_url":"https://api.github.com/users/dougbu/orgs","repos_url":"https://api.github.com/users/dougbu/repos","events_url":"https://api.github.com/users/dougbu/events{/privacy}","received_events_url":"https://api.github.com/users/dougbu/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T15:35:55Z","updated_at":"2015-03-06T15:35:55Z","body":"will this configuration story relate in any way to the `IOptions` story?  I don't see how e.g. customers could configure `<form/>` tag helpers using a config.json file."}}