{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Localization/pulls/comments/80147747","id":80147747,"diff_hunk":"@@ -0,0 +1,69 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.Globalization;\n+using System.Linq;\n+using System.Reflection;\n+using System.Threading.Tasks;\n+using Microsoft.AspNetCore.Builder;\n+using Microsoft.AspNetCore.Http;\n+using Microsoft.AspNetCore.Localization;\n+using Microsoft.Extensions.DependencyInjection;\n+using Microsoft.Extensions.Localization;\n+using Microsoft.Extensions.Logging;\n+\n+namespace LocalizationWebsite\n+{\n+    public class StartupResourcesInClassLibrary\n+    {\n+        public void ConfigureServices(IServiceCollection services)\n+        {\n+            services.AddLocalization(options => options.ResourcesPath = \"Resources\");\n+        }\n+\n+        public void Configure(\n+            IApplicationBuilder app,\n+            ILoggerFactory loggerFactory,\n+            IStringLocalizerFactory stringLocalizerFactory,\n+            IStringLocalizer<ResourcesClassLibraryNoAttribute.Model> noAttributeStringLocalizer,\n+            IStringLocalizer<ResourcesClassLibraryWithAttribute.Model> withAttributeStringLocalizer)\n+        {\n+            loggerFactory.AddConsole(minLevel: LogLevel.Warning);\n+\n+            var supportedCultures = new List<CultureInfo>()\n+            {\n+                new CultureInfo(\"en-US\"),\n+                new CultureInfo(\"fr-FR\")\n+            };\n+\n+            app.UseRequestLocalization(new RequestLocalizationOptions\n+            {\n+                DefaultRequestCulture = new RequestCulture(\"en-US\"),\n+                SupportedCultures = supportedCultures,\n+                SupportedUICultures = supportedCultures\n+            });\n+\n+            var noAttributeAssembly = typeof(ResourcesClassLibraryNoAttribute.Model).GetTypeInfo().Assembly;\n+            var noAttributeName = new AssemblyName(noAttributeAssembly.FullName).Name;\n+            var noAttributeNameStringLocalizer = stringLocalizerFactory.Create(\n+                nameof(ResourcesClassLibraryNoAttribute.Model),\n+                noAttributeName);\n+\n+            var withAttributeAssembly = typeof(ResourcesClassLibraryWithAttribute.Model).GetTypeInfo().Assembly;\n+            var withAttributeName = new AssemblyName(withAttributeAssembly.FullName).Name;\n+            var withAttributeNameStringLocalizer = stringLocalizerFactory.Create(\n+                nameof(ResourcesClassLibraryWithAttribute.Model),\n+                withAttributeName);","path":"test/LocalizationWebsite/StartupResourcesInClassLibrary.cs","position":56,"original_position":55,"commit_id":"7995e49c8e25462cb25a48638f201ebe9f2af9f1","original_commit_id":"6975fdde1a71c54f3b440bd5a69b104b763da51f","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},"body":":ok_hand: ","created_at":"2016-09-22T22:08:33Z","updated_at":"2016-09-22T22:11:13Z","html_url":"https://github.com/aspnet/Localization/pull/283#discussion_r80147747","pull_request_url":"https://api.github.com/repos/aspnet/Localization/pulls/283","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/comments/80147747"},"html":{"href":"https://github.com/aspnet/Localization/pull/283#discussion_r80147747"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/283"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Localization/pulls/283","id":85648146,"html_url":"https://github.com/aspnet/Localization/pull/283","diff_url":"https://github.com/aspnet/Localization/pull/283.diff","patch_url":"https://github.com/aspnet/Localization/pull/283.patch","issue_url":"https://api.github.com/repos/aspnet/Localization/issues/283","number":283,"state":"open","locked":false,"title":"Class library resources","user":{"login":"ryanbrandenburg","id":14987221,"avatar_url":"https://avatars.githubusercontent.com/u/14987221?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbrandenburg","html_url":"https://github.com/ryanbrandenburg","followers_url":"https://api.github.com/users/ryanbrandenburg/followers","following_url":"https://api.github.com/users/ryanbrandenburg/following{/other_user}","gists_url":"https://api.github.com/users/ryanbrandenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbrandenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbrandenburg/subscriptions","organizations_url":"https://api.github.com/users/ryanbrandenburg/orgs","repos_url":"https://api.github.com/users/ryanbrandenburg/repos","events_url":"https://api.github.com/users/ryanbrandenburg/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbrandenburg/received_events","type":"User","site_admin":false},"body":"This should allow localization to find resources in a class library by using an Assembly attribute to note the location of the resources folder.","created_at":"2016-09-16T22:19:11Z","updated_at":"2016-09-22T22:11:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"009904498932720d731327d77278bc373976a92c","assignee":{"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},"assignees":[{"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}],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Localization/pulls/283/commits","review_comments_url":"https://api.github.com/repos/aspnet/Localization/pulls/283/comments","review_comment_url":"https://api.github.com/repos/aspnet/Localization/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Localization/issues/283/comments","statuses_url":"https://api.github.com/repos/aspnet/Localization/statuses/7995e49c8e25462cb25a48638f201ebe9f2af9f1","head":{"label":"aspnet:rybrande/ClassLibraryResources","ref":"rybrande/ClassLibraryResources","sha":"7995e49c8e25462cb25a48638f201ebe9f2af9f1","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":35138798,"name":"Localization","full_name":"aspnet/Localization","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Localization","description":"Localization abstractions and implementations for ASP.NET Core applications.","fork":false,"url":"https://api.github.com/repos/aspnet/Localization","forks_url":"https://api.github.com/repos/aspnet/Localization/forks","keys_url":"https://api.github.com/repos/aspnet/Localization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Localization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Localization/teams","hooks_url":"https://api.github.com/repos/aspnet/Localization/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Localization/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Localization/events","assignees_url":"https://api.github.com/repos/aspnet/Localization/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Localization/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Localization/tags","blobs_url":"https://api.github.com/repos/aspnet/Localization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Localization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Localization/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Localization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Localization/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Localization/languages","stargazers_url":"https://api.github.com/repos/aspnet/Localization/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Localization/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Localization/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Localization/subscription","commits_url":"https://api.github.com/repos/aspnet/Localization/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Localization/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Localization/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Localization/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Localization/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Localization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Localization/merges","archive_url":"https://api.github.com/repos/aspnet/Localization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Localization/downloads","issues_url":"https://api.github.com/repos/aspnet/Localization/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Localization/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Localization/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Localization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Localization/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Localization/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Localization/deployments","created_at":"2015-05-06T04:07:17Z","updated_at":"2016-09-08T10:58:13Z","pushed_at":"2016-09-22T00:37:42Z","git_url":"git://github.com/aspnet/Localization.git","ssh_url":"git@github.com:aspnet/Localization.git","clone_url":"https://github.com/aspnet/Localization.git","svn_url":"https://github.com/aspnet/Localization","homepage":"","size":1001,"stargazers_count":64,"watchers_count":64,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":24,"forks":29,"open_issues":24,"watchers":64,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"f650de8cdf5214bcbb2e88210baac0f99ce3d053","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":35138798,"name":"Localization","full_name":"aspnet/Localization","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Localization","description":"Localization abstractions and implementations for ASP.NET Core applications.","fork":false,"url":"https://api.github.com/repos/aspnet/Localization","forks_url":"https://api.github.com/repos/aspnet/Localization/forks","keys_url":"https://api.github.com/repos/aspnet/Localization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Localization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Localization/teams","hooks_url":"https://api.github.com/repos/aspnet/Localization/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Localization/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Localization/events","assignees_url":"https://api.github.com/repos/aspnet/Localization/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Localization/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Localization/tags","blobs_url":"https://api.github.com/repos/aspnet/Localization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Localization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Localization/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Localization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Localization/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Localization/languages","stargazers_url":"https://api.github.com/repos/aspnet/Localization/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Localization/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Localization/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Localization/subscription","commits_url":"https://api.github.com/repos/aspnet/Localization/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Localization/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Localization/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Localization/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Localization/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Localization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Localization/merges","archive_url":"https://api.github.com/repos/aspnet/Localization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Localization/downloads","issues_url":"https://api.github.com/repos/aspnet/Localization/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Localization/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Localization/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Localization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Localization/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Localization/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Localization/deployments","created_at":"2015-05-06T04:07:17Z","updated_at":"2016-09-08T10:58:13Z","pushed_at":"2016-09-22T00:37:42Z","git_url":"git://github.com/aspnet/Localization.git","ssh_url":"git@github.com:aspnet/Localization.git","clone_url":"https://github.com/aspnet/Localization.git","svn_url":"https://github.com/aspnet/Localization","homepage":"","size":1001,"stargazers_count":64,"watchers_count":64,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":24,"forks":29,"open_issues":24,"watchers":64,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/283"},"html":{"href":"https://github.com/aspnet/Localization/pull/283"},"issue":{"href":"https://api.github.com/repos/aspnet/Localization/issues/283"},"comments":{"href":"https://api.github.com/repos/aspnet/Localization/issues/283/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/283/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/283/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Localization/statuses/7995e49c8e25462cb25a48638f201ebe9f2af9f1"}}}}
{"actor":{"display_login":"dougbu"}}