{"action":"created","comment":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/comments/50552369","id":50552369,"diff_hunk":"@@ -34,49 +26,42 @@ public class MapperConfiguration : IConfigurationProvider, IConfiguration\n         private readonly ConcurrentDictionary<TypePair, CreateTypeMapExpression> _typeMapExpressionCache =\r\n             new ConcurrentDictionary<TypePair, CreateTypeMapExpression>();\r\n \r\n-        internal readonly ConcurrentDictionary<string, IProfileExpression> _formatterProfiles =\r\n-            new ConcurrentDictionary<string, IProfileExpression>();\r\n+        private readonly ConcurrentDictionary<string, Profile> _formatterProfiles =\r\n+            new ConcurrentDictionary<string, Profile>();\r\n \r\n         private Func<Type, object> _serviceCtor = ObjectCreator.CreateObject;\r\n \r\n         private readonly List<string> _globalIgnore;\r\n \r\n-        public MapperConfiguration(IEnumerable<IObjectMapper> mappers, IEnumerable<ITypeMapObjectMapper> typeMapObjectMappers)\r\n+        public MapperConfiguration(Action<IConfiguration> configure) : this(configure, MapperRegistry.Mappers, TypeMapObjectMapperRegistry.Mappers)\r\n+        {\r\n+        }\r\n+\r\n+        public MapperConfiguration(Action<IConfiguration> configure, IEnumerable<IObjectMapper> mappers, IEnumerable<ITypeMapObjectMapper> typeMapObjectMappers) \r\n         {\r\n             _typeMapFactory = new TypeMapFactory();\r\n             _mappers = mappers;\r\n             _typeMapObjectMappers = typeMapObjectMappers;\r\n             _globalIgnore = new List<string>();\r\n-        }\r\n-\r\n-        public MapperConfiguration() : this(MapperRegistry.Mappers, TypeMapObjectMapperRegistry.Mappers)\r\n-        {\r\n-        }\r\n \r\n-        public MapperConfiguration(Action<IConfiguration> configure) : this(MapperRegistry.Mappers, TypeMapObjectMapperRegistry.Mappers)\r\n-        {\r\n             configure(this);\r\n-        }\r\n \r\n-        public MapperConfiguration(Action<IConfiguration> configure, IEnumerable<IObjectMapper> mappers, IEnumerable<ITypeMapObjectMapper> typeMapObjectMappers) \r\n-            : this(mappers, typeMapObjectMappers)\r\n-        {\r\n-            configure(this);\r\n+            Seal();\r\n+\r\n+            ExpressionBuilder = new ExpressionBuilder(this);\r","path":"src/AutoMapper/MapperConfiguration.cs","position":61,"original_position":61,"commit_id":"28f949c6de0412a9fcd93dd1f79c9ea4086a61de","original_commit_id":"28f949c6de0412a9fcd93dd1f79c9ea4086a61de","user":{"login":"lbargaoanu","id":4517428,"avatar_url":"https://avatars.githubusercontent.com/u/4517428?v=3","gravatar_id":"","url":"https://api.github.com/users/lbargaoanu","html_url":"https://github.com/lbargaoanu","followers_url":"https://api.github.com/users/lbargaoanu/followers","following_url":"https://api.github.com/users/lbargaoanu/following{/other_user}","gists_url":"https://api.github.com/users/lbargaoanu/gists{/gist_id}","starred_url":"https://api.github.com/users/lbargaoanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbargaoanu/subscriptions","organizations_url":"https://api.github.com/users/lbargaoanu/orgs","repos_url":"https://api.github.com/users/lbargaoanu/repos","events_url":"https://api.github.com/users/lbargaoanu/events{/privacy}","received_events_url":"https://api.github.com/users/lbargaoanu/received_events","type":"User","site_admin":false},"body":"I mean if they don't use ProjectTo, they shouldn't pay for it. You create the ExpressionBuilder eagerly, and now it's OK, but I think we should keep that in mind.","created_at":"2016-01-22T15:51:42Z","updated_at":"2016-01-22T15:51:42Z","html_url":"https://github.com/AutoMapper/AutoMapper/pull/1039#discussion_r50552369","pull_request_url":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/1039","_links":{"self":{"href":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/comments/50552369"},"html":{"href":"https://github.com/AutoMapper/AutoMapper/pull/1039#discussion_r50552369"},"pull_request":{"href":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/1039"}}},"pull_request":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/1039","id":56900025,"html_url":"https://github.com/AutoMapper/AutoMapper/pull/1039","diff_url":"https://github.com/AutoMapper/AutoMapper/pull/1039.diff","patch_url":"https://github.com/AutoMapper/AutoMapper/pull/1039.patch","issue_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1039","number":1039,"state":"open","locked":false,"title":"[WIP] Read only configuration","user":{"login":"jbogard","id":104498,"avatar_url":"https://avatars.githubusercontent.com/u/104498?v=3","gravatar_id":"","url":"https://api.github.com/users/jbogard","html_url":"https://github.com/jbogard","followers_url":"https://api.github.com/users/jbogard/followers","following_url":"https://api.github.com/users/jbogard/following{/other_user}","gists_url":"https://api.github.com/users/jbogard/gists{/gist_id}","starred_url":"https://api.github.com/users/jbogard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbogard/subscriptions","organizations_url":"https://api.github.com/users/jbogard/orgs","repos_url":"https://api.github.com/users/jbogard/repos","events_url":"https://api.github.com/users/jbogard/events{/privacy}","received_events_url":"https://api.github.com/users/jbogard/received_events","type":"User","site_admin":false},"body":"Forcing read-only configuration","created_at":"2016-01-22T15:18:50Z","updated_at":"2016-01-22T15:51:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e3278f3359a59956b67dbc1067cc75338d9f3e2","assignee":null,"milestone":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/milestones/16","html_url":"https://github.com/AutoMapper/AutoMapper/milestones/4.2.0","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/milestones/16/labels","id":1297835,"number":16,"title":"4.2.0","description":"","creator":{"login":"jbogard","id":104498,"avatar_url":"https://avatars.githubusercontent.com/u/104498?v=3","gravatar_id":"","url":"https://api.github.com/users/jbogard","html_url":"https://github.com/jbogard","followers_url":"https://api.github.com/users/jbogard/followers","following_url":"https://api.github.com/users/jbogard/following{/other_user}","gists_url":"https://api.github.com/users/jbogard/gists{/gist_id}","starred_url":"https://api.github.com/users/jbogard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbogard/subscriptions","organizations_url":"https://api.github.com/users/jbogard/orgs","repos_url":"https://api.github.com/users/jbogard/repos","events_url":"https://api.github.com/users/jbogard/events{/privacy}","received_events_url":"https://api.github.com/users/jbogard/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":32,"state":"open","created_at":"2015-09-09T14:46:10Z","updated_at":"2016-01-22T15:18:50Z","due_on":"2016-01-19T06:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/1039/commits","review_comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/1039/comments","review_comment_url":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1039/comments","statuses_url":"https://api.github.com/repos/AutoMapper/AutoMapper/statuses/28f949c6de0412a9fcd93dd1f79c9ea4086a61de","head":{"label":"jbogard:ReadOnlyConfiguration","ref":"ReadOnlyConfiguration","sha":"28f949c6de0412a9fcd93dd1f79c9ea4086a61de","user":{"login":"jbogard","id":104498,"avatar_url":"https://avatars.githubusercontent.com/u/104498?v=3","gravatar_id":"","url":"https://api.github.com/users/jbogard","html_url":"https://github.com/jbogard","followers_url":"https://api.github.com/users/jbogard/followers","following_url":"https://api.github.com/users/jbogard/following{/other_user}","gists_url":"https://api.github.com/users/jbogard/gists{/gist_id}","starred_url":"https://api.github.com/users/jbogard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbogard/subscriptions","organizations_url":"https://api.github.com/users/jbogard/orgs","repos_url":"https://api.github.com/users/jbogard/repos","events_url":"https://api.github.com/users/jbogard/events{/privacy}","received_events_url":"https://api.github.com/users/jbogard/received_events","type":"User","site_admin":false},"repo":{"id":1989029,"name":"AutoMapper","full_name":"jbogard/AutoMapper","owner":{"login":"jbogard","id":104498,"avatar_url":"https://avatars.githubusercontent.com/u/104498?v=3","gravatar_id":"","url":"https://api.github.com/users/jbogard","html_url":"https://github.com/jbogard","followers_url":"https://api.github.com/users/jbogard/followers","following_url":"https://api.github.com/users/jbogard/following{/other_user}","gists_url":"https://api.github.com/users/jbogard/gists{/gist_id}","starred_url":"https://api.github.com/users/jbogard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbogard/subscriptions","organizations_url":"https://api.github.com/users/jbogard/orgs","repos_url":"https://api.github.com/users/jbogard/repos","events_url":"https://api.github.com/users/jbogard/events{/privacy}","received_events_url":"https://api.github.com/users/jbogard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbogard/AutoMapper","description":"A convention-based object-object mapper in .NET. ","fork":true,"url":"https://api.github.com/repos/jbogard/AutoMapper","forks_url":"https://api.github.com/repos/jbogard/AutoMapper/forks","keys_url":"https://api.github.com/repos/jbogard/AutoMapper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbogard/AutoMapper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbogard/AutoMapper/teams","hooks_url":"https://api.github.com/repos/jbogard/AutoMapper/hooks","issue_events_url":"https://api.github.com/repos/jbogard/AutoMapper/issues/events{/number}","events_url":"https://api.github.com/repos/jbogard/AutoMapper/events","assignees_url":"https://api.github.com/repos/jbogard/AutoMapper/assignees{/user}","branches_url":"https://api.github.com/repos/jbogard/AutoMapper/branches{/branch}","tags_url":"https://api.github.com/repos/jbogard/AutoMapper/tags","blobs_url":"https://api.github.com/repos/jbogard/AutoMapper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbogard/AutoMapper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbogard/AutoMapper/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbogard/AutoMapper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbogard/AutoMapper/statuses/{sha}","languages_url":"https://api.github.com/repos/jbogard/AutoMapper/languages","stargazers_url":"https://api.github.com/repos/jbogard/AutoMapper/stargazers","contributors_url":"https://api.github.com/repos/jbogard/AutoMapper/contributors","subscribers_url":"https://api.github.com/repos/jbogard/AutoMapper/subscribers","subscription_url":"https://api.github.com/repos/jbogard/AutoMapper/subscription","commits_url":"https://api.github.com/repos/jbogard/AutoMapper/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbogard/AutoMapper/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbogard/AutoMapper/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbogard/AutoMapper/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbogard/AutoMapper/contents/{+path}","compare_url":"https://api.github.com/repos/jbogard/AutoMapper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbogard/AutoMapper/merges","archive_url":"https://api.github.com/repos/jbogard/AutoMapper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbogard/AutoMapper/downloads","issues_url":"https://api.github.com/repos/jbogard/AutoMapper/issues{/number}","pulls_url":"https://api.github.com/repos/jbogard/AutoMapper/pulls{/number}","milestones_url":"https://api.github.com/repos/jbogard/AutoMapper/milestones{/number}","notifications_url":"https://api.github.com/repos/jbogard/AutoMapper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbogard/AutoMapper/labels{/name}","releases_url":"https://api.github.com/repos/jbogard/AutoMapper/releases{/id}","deployments_url":"https://api.github.com/repos/jbogard/AutoMapper/deployments","created_at":"2011-07-02T21:00:08Z","updated_at":"2016-01-20T18:59:31Z","pushed_at":"2016-01-22T15:17:42Z","git_url":"git://github.com/jbogard/AutoMapper.git","ssh_url":"git@github.com:jbogard/AutoMapper.git","clone_url":"https://github.com/jbogard/AutoMapper.git","svn_url":"https://github.com/jbogard/AutoMapper","homepage":"http://automapper.org","size":65381,"stargazers_count":56,"watchers_count":56,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":0,"forks":19,"open_issues":0,"watchers":56,"default_branch":"master"}},"base":{"label":"AutoMapper:develop","ref":"develop","sha":"33db98dd454d0b105e30244bf458241514cdca5f","user":{"login":"AutoMapper","id":890883,"avatar_url":"https://avatars.githubusercontent.com/u/890883?v=3","gravatar_id":"","url":"https://api.github.com/users/AutoMapper","html_url":"https://github.com/AutoMapper","followers_url":"https://api.github.com/users/AutoMapper/followers","following_url":"https://api.github.com/users/AutoMapper/following{/other_user}","gists_url":"https://api.github.com/users/AutoMapper/gists{/gist_id}","starred_url":"https://api.github.com/users/AutoMapper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AutoMapper/subscriptions","organizations_url":"https://api.github.com/users/AutoMapper/orgs","repos_url":"https://api.github.com/users/AutoMapper/repos","events_url":"https://api.github.com/users/AutoMapper/events{/privacy}","received_events_url":"https://api.github.com/users/AutoMapper/received_events","type":"Organization","site_admin":false},"repo":{"id":505380,"name":"AutoMapper","full_name":"AutoMapper/AutoMapper","owner":{"login":"AutoMapper","id":890883,"avatar_url":"https://avatars.githubusercontent.com/u/890883?v=3","gravatar_id":"","url":"https://api.github.com/users/AutoMapper","html_url":"https://github.com/AutoMapper","followers_url":"https://api.github.com/users/AutoMapper/followers","following_url":"https://api.github.com/users/AutoMapper/following{/other_user}","gists_url":"https://api.github.com/users/AutoMapper/gists{/gist_id}","starred_url":"https://api.github.com/users/AutoMapper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AutoMapper/subscriptions","organizations_url":"https://api.github.com/users/AutoMapper/orgs","repos_url":"https://api.github.com/users/AutoMapper/repos","events_url":"https://api.github.com/users/AutoMapper/events{/privacy}","received_events_url":"https://api.github.com/users/AutoMapper/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AutoMapper/AutoMapper","description":"A convention-based object-object mapper in .NET. ","fork":false,"url":"https://api.github.com/repos/AutoMapper/AutoMapper","forks_url":"https://api.github.com/repos/AutoMapper/AutoMapper/forks","keys_url":"https://api.github.com/repos/AutoMapper/AutoMapper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AutoMapper/AutoMapper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AutoMapper/AutoMapper/teams","hooks_url":"https://api.github.com/repos/AutoMapper/AutoMapper/hooks","issue_events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/events{/number}","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/events","assignees_url":"https://api.github.com/repos/AutoMapper/AutoMapper/assignees{/user}","branches_url":"https://api.github.com/repos/AutoMapper/AutoMapper/branches{/branch}","tags_url":"https://api.github.com/repos/AutoMapper/AutoMapper/tags","blobs_url":"https://api.github.com/repos/AutoMapper/AutoMapper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AutoMapper/AutoMapper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AutoMapper/AutoMapper/git/refs{/sha}","trees_url":"https://api.github.com/repos/AutoMapper/AutoMapper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AutoMapper/AutoMapper/statuses/{sha}","languages_url":"https://api.github.com/repos/AutoMapper/AutoMapper/languages","stargazers_url":"https://api.github.com/repos/AutoMapper/AutoMapper/stargazers","contributors_url":"https://api.github.com/repos/AutoMapper/AutoMapper/contributors","subscribers_url":"https://api.github.com/repos/AutoMapper/AutoMapper/subscribers","subscription_url":"https://api.github.com/repos/AutoMapper/AutoMapper/subscription","commits_url":"https://api.github.com/repos/AutoMapper/AutoMapper/commits{/sha}","git_commits_url":"https://api.github.com/repos/AutoMapper/AutoMapper/git/commits{/sha}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/comments{/number}","issue_comment_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments{/number}","contents_url":"https://api.github.com/repos/AutoMapper/AutoMapper/contents/{+path}","compare_url":"https://api.github.com/repos/AutoMapper/AutoMapper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AutoMapper/AutoMapper/merges","archive_url":"https://api.github.com/repos/AutoMapper/AutoMapper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AutoMapper/AutoMapper/downloads","issues_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues{/number}","pulls_url":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls{/number}","milestones_url":"https://api.github.com/repos/AutoMapper/AutoMapper/milestones{/number}","notifications_url":"https://api.github.com/repos/AutoMapper/AutoMapper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/labels{/name}","releases_url":"https://api.github.com/repos/AutoMapper/AutoMapper/releases{/id}","deployments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/deployments","created_at":"2010-02-06T15:17:58Z","updated_at":"2016-01-22T14:17:39Z","pushed_at":"2016-01-22T15:18:50Z","git_url":"git://github.com/AutoMapper/AutoMapper.git","ssh_url":"git@github.com:AutoMapper/AutoMapper.git","clone_url":"https://github.com/AutoMapper/AutoMapper.git","svn_url":"https://github.com/AutoMapper/AutoMapper","homepage":"http://automapper.org","size":134122,"stargazers_count":3172,"watchers_count":3172,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":856,"mirror_url":null,"open_issues_count":40,"forks":856,"open_issues":40,"watchers":3172,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/1039"},"html":{"href":"https://github.com/AutoMapper/AutoMapper/pull/1039"},"issue":{"href":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1039"},"comments":{"href":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1039/comments"},"review_comments":{"href":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/1039/comments"},"review_comment":{"href":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/1039/commits"},"statuses":{"href":"https://api.github.com/repos/AutoMapper/AutoMapper/statuses/28f949c6de0412a9fcd93dd1f79c9ea4086a61de"}}}}