{"action":"created","comment":{"url":"https://api.github.com/repos/Benglin/Dynamo/pulls/comments/23501915","id":23501915,"diff_hunk":"@@ -0,0 +1,102 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.ComponentModel;\n+using System.Drawing;\n+using System.Linq;\n+using System.Reflection;\n+using System.Resources;\n+using System.Text;\n+using System.Windows;\n+using System.Windows.Media.Imaging;\n+using Dynamo.DSEngine;\n+\n+namespace Dynamo.Wpf.Services\n+{\n+    public class IconsService\n+    {\n+        private static Dictionary<Assembly, IconsWarehouse> warehouses =\n+            new Dictionary<Assembly, IconsWarehouse>();\n+\n+        internal static IconsWarehouse GetForAssembly(string assemblyPath)\n+        {\n+            var libraryCustomization = LibraryCustomizationServices.GetForAssembly(assemblyPath);\n+            if (libraryCustomization == null)\n+                return null;\n+\n+            var assembly = libraryCustomization.Assembly;\n+\n+            if (!warehouses.ContainsKey(assembly))\n+                warehouses[assembly] = new IconsWarehouse(assembly);\n+\n+            return warehouses[assembly];\n+        }\n+    }\n+\n+    public class IconsWarehouse","path":"src/DynamoCoreWpf/Services/IconsService.cs","position":35,"original_position":35,"commit_id":"f05f425c6542bfc4da6725a01acf72209091f821","original_commit_id":"f05f425c6542bfc4da6725a01acf72209091f821","user":{"login":"Benglin","id":5086849,"avatar_url":"https://avatars.githubusercontent.com/u/5086849?v=3","gravatar_id":"","url":"https://api.github.com/users/Benglin","html_url":"https://github.com/Benglin","followers_url":"https://api.github.com/users/Benglin/followers","following_url":"https://api.github.com/users/Benglin/following{/other_user}","gists_url":"https://api.github.com/users/Benglin/gists{/gist_id}","starred_url":"https://api.github.com/users/Benglin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Benglin/subscriptions","organizations_url":"https://api.github.com/users/Benglin/orgs","repos_url":"https://api.github.com/users/Benglin/repos","events_url":"https://api.github.com/users/Benglin/events{/privacy}","received_events_url":"https://api.github.com/users/Benglin/received_events","type":"User","site_admin":false},"body":"`IconsWarehouse`, such a creative name :)\r\n\r\nI would have gone with `IconWarehouse` and `IconService` (both `Icon` in singular form).\r\n\r\nI personally don't have an opinion about this, just checking in with @pboyer to see if he has a more brilliant idea?","created_at":"2015-01-25T04:47:03Z","updated_at":"2015-01-25T04:47:03Z","html_url":"https://github.com/Benglin/Dynamo/pull/271#discussion_r23501915","pull_request_url":"https://api.github.com/repos/Benglin/Dynamo/pulls/271","_links":{"self":{"href":"https://api.github.com/repos/Benglin/Dynamo/pulls/comments/23501915"},"html":{"href":"https://github.com/Benglin/Dynamo/pull/271#discussion_r23501915"},"pull_request":{"href":"https://api.github.com/repos/Benglin/Dynamo/pulls/271"}}},"pull_request":{"url":"https://api.github.com/repos/Benglin/Dynamo/pulls/271","id":27976052,"html_url":"https://github.com/Benglin/Dynamo/pull/271","diff_url":"https://github.com/Benglin/Dynamo/pull/271.diff","patch_url":"https://github.com/Benglin/Dynamo/pull/271.patch","issue_url":"https://api.github.com/repos/Benglin/Dynamo/issues/271","number":271,"state":"open","locked":false,"title":"Moving icons loading functionality to DynamoCoreWpf project","user":{"login":"vmoyseenko","id":8158551,"avatar_url":"https://avatars.githubusercontent.com/u/8158551?v=3","gravatar_id":"","url":"https://api.github.com/users/vmoyseenko","html_url":"https://github.com/vmoyseenko","followers_url":"https://api.github.com/users/vmoyseenko/followers","following_url":"https://api.github.com/users/vmoyseenko/following{/other_user}","gists_url":"https://api.github.com/users/vmoyseenko/gists{/gist_id}","starred_url":"https://api.github.com/users/vmoyseenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmoyseenko/subscriptions","organizations_url":"https://api.github.com/users/vmoyseenko/orgs","repos_url":"https://api.github.com/users/vmoyseenko/repos","events_url":"https://api.github.com/users/vmoyseenko/events{/privacy}","received_events_url":"https://api.github.com/users/vmoyseenko/received_events","type":"User","site_admin":false},"body":"#### Purpose\r\n\r\nTo remove \"PresentationCore\" dependency in \"DynamoCore\" icons loading functionality is moved to \"DynamoCoreWpf\" project.\r\n\r\n#### Modifications\r\n\r\nCreated new class `IconsService` which saves links to icons warehouse for every resource assembly.\r\n\r\n#### Additional references\r\n\r\n[MAGN-5656](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-5656)  DUI: Rework LibraryCutomization class to remove reference on PresentationCore.dll\r\n\r\nUnfortunately it is impossible to remove `PresentationCore` dependency as some references are presented in `Configurations.cs`. There is connected task from Peter: [MAGN-5608](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-5608) Clean up VisualConfigurations, Configurations after DynamoCoreSplit.\r\n\r\n#### Reviewers\r\n\r\n@Benglin, please, take a look. ","created_at":"2015-01-24T12:44:05Z","updated_at":"2015-01-25T04:47:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"808da5c13e05e6374f1e3418021bc419503611a2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Benglin/Dynamo/pulls/271/commits","review_comments_url":"https://api.github.com/repos/Benglin/Dynamo/pulls/271/comments","review_comment_url":"https://api.github.com/repos/Benglin/Dynamo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Benglin/Dynamo/issues/271/comments","statuses_url":"https://api.github.com/repos/Benglin/Dynamo/statuses/f05f425c6542bfc4da6725a01acf72209091f821","head":{"label":"vmoyseenko:DUI-LibraryCustomizationRework","ref":"DUI-LibraryCustomizationRework","sha":"f05f425c6542bfc4da6725a01acf72209091f821","user":{"login":"vmoyseenko","id":8158551,"avatar_url":"https://avatars.githubusercontent.com/u/8158551?v=3","gravatar_id":"","url":"https://api.github.com/users/vmoyseenko","html_url":"https://github.com/vmoyseenko","followers_url":"https://api.github.com/users/vmoyseenko/followers","following_url":"https://api.github.com/users/vmoyseenko/following{/other_user}","gists_url":"https://api.github.com/users/vmoyseenko/gists{/gist_id}","starred_url":"https://api.github.com/users/vmoyseenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmoyseenko/subscriptions","organizations_url":"https://api.github.com/users/vmoyseenko/orgs","repos_url":"https://api.github.com/users/vmoyseenko/repos","events_url":"https://api.github.com/users/vmoyseenko/events{/privacy}","received_events_url":"https://api.github.com/users/vmoyseenko/received_events","type":"User","site_admin":false},"repo":{"id":21822485,"name":"Dynamo","full_name":"vmoyseenko/Dynamo","owner":{"login":"vmoyseenko","id":8158551,"avatar_url":"https://avatars.githubusercontent.com/u/8158551?v=3","gravatar_id":"","url":"https://api.github.com/users/vmoyseenko","html_url":"https://github.com/vmoyseenko","followers_url":"https://api.github.com/users/vmoyseenko/followers","following_url":"https://api.github.com/users/vmoyseenko/following{/other_user}","gists_url":"https://api.github.com/users/vmoyseenko/gists{/gist_id}","starred_url":"https://api.github.com/users/vmoyseenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmoyseenko/subscriptions","organizations_url":"https://api.github.com/users/vmoyseenko/orgs","repos_url":"https://api.github.com/users/vmoyseenko/repos","events_url":"https://api.github.com/users/vmoyseenko/events{/privacy}","received_events_url":"https://api.github.com/users/vmoyseenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vmoyseenko/Dynamo","description":"Visual Programming For Revit","fork":true,"url":"https://api.github.com/repos/vmoyseenko/Dynamo","forks_url":"https://api.github.com/repos/vmoyseenko/Dynamo/forks","keys_url":"https://api.github.com/repos/vmoyseenko/Dynamo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmoyseenko/Dynamo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmoyseenko/Dynamo/teams","hooks_url":"https://api.github.com/repos/vmoyseenko/Dynamo/hooks","issue_events_url":"https://api.github.com/repos/vmoyseenko/Dynamo/issues/events{/number}","events_url":"https://api.github.com/repos/vmoyseenko/Dynamo/events","assignees_url":"https://api.github.com/repos/vmoyseenko/Dynamo/assignees{/user}","branches_url":"https://api.github.com/repos/vmoyseenko/Dynamo/branches{/branch}","tags_url":"https://api.github.com/repos/vmoyseenko/Dynamo/tags","blobs_url":"https://api.github.com/repos/vmoyseenko/Dynamo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmoyseenko/Dynamo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmoyseenko/Dynamo/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmoyseenko/Dynamo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmoyseenko/Dynamo/statuses/{sha}","languages_url":"https://api.github.com/repos/vmoyseenko/Dynamo/languages","stargazers_url":"https://api.github.com/repos/vmoyseenko/Dynamo/stargazers","contributors_url":"https://api.github.com/repos/vmoyseenko/Dynamo/contributors","subscribers_url":"https://api.github.com/repos/vmoyseenko/Dynamo/subscribers","subscription_url":"https://api.github.com/repos/vmoyseenko/Dynamo/subscription","commits_url":"https://api.github.com/repos/vmoyseenko/Dynamo/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmoyseenko/Dynamo/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmoyseenko/Dynamo/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmoyseenko/Dynamo/issues/comments/{number}","contents_url":"https://api.github.com/repos/vmoyseenko/Dynamo/contents/{+path}","compare_url":"https://api.github.com/repos/vmoyseenko/Dynamo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmoyseenko/Dynamo/merges","archive_url":"https://api.github.com/repos/vmoyseenko/Dynamo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmoyseenko/Dynamo/downloads","issues_url":"https://api.github.com/repos/vmoyseenko/Dynamo/issues{/number}","pulls_url":"https://api.github.com/repos/vmoyseenko/Dynamo/pulls{/number}","milestones_url":"https://api.github.com/repos/vmoyseenko/Dynamo/milestones{/number}","notifications_url":"https://api.github.com/repos/vmoyseenko/Dynamo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmoyseenko/Dynamo/labels{/name}","releases_url":"https://api.github.com/repos/vmoyseenko/Dynamo/releases{/id}","created_at":"2014-07-14T14:27:39Z","updated_at":"2015-01-22T13:01:54Z","pushed_at":"2015-01-24T12:32:14Z","git_url":"git://github.com/vmoyseenko/Dynamo.git","ssh_url":"git@github.com:vmoyseenko/Dynamo.git","clone_url":"https://github.com/vmoyseenko/Dynamo.git","svn_url":"https://github.com/vmoyseenko/Dynamo","homepage":"http://dynamobim.org","size":657596,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"Sitrus2"}},"base":{"label":"Benglin:Sitrus","ref":"Sitrus","sha":"60b19a9437fd882bf7372b395c4d56bec101916f","user":{"login":"Benglin","id":5086849,"avatar_url":"https://avatars.githubusercontent.com/u/5086849?v=3","gravatar_id":"","url":"https://api.github.com/users/Benglin","html_url":"https://github.com/Benglin","followers_url":"https://api.github.com/users/Benglin/followers","following_url":"https://api.github.com/users/Benglin/following{/other_user}","gists_url":"https://api.github.com/users/Benglin/gists{/gist_id}","starred_url":"https://api.github.com/users/Benglin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Benglin/subscriptions","organizations_url":"https://api.github.com/users/Benglin/orgs","repos_url":"https://api.github.com/users/Benglin/repos","events_url":"https://api.github.com/users/Benglin/events{/privacy}","received_events_url":"https://api.github.com/users/Benglin/received_events","type":"User","site_admin":false},"repo":{"id":11675425,"name":"Dynamo","full_name":"Benglin/Dynamo","owner":{"login":"Benglin","id":5086849,"avatar_url":"https://avatars.githubusercontent.com/u/5086849?v=3","gravatar_id":"","url":"https://api.github.com/users/Benglin","html_url":"https://github.com/Benglin","followers_url":"https://api.github.com/users/Benglin/followers","following_url":"https://api.github.com/users/Benglin/following{/other_user}","gists_url":"https://api.github.com/users/Benglin/gists{/gist_id}","starred_url":"https://api.github.com/users/Benglin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Benglin/subscriptions","organizations_url":"https://api.github.com/users/Benglin/orgs","repos_url":"https://api.github.com/users/Benglin/repos","events_url":"https://api.github.com/users/Benglin/events{/privacy}","received_events_url":"https://api.github.com/users/Benglin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Benglin/Dynamo","description":"Visual Programming For Revit","fork":true,"url":"https://api.github.com/repos/Benglin/Dynamo","forks_url":"https://api.github.com/repos/Benglin/Dynamo/forks","keys_url":"https://api.github.com/repos/Benglin/Dynamo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Benglin/Dynamo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Benglin/Dynamo/teams","hooks_url":"https://api.github.com/repos/Benglin/Dynamo/hooks","issue_events_url":"https://api.github.com/repos/Benglin/Dynamo/issues/events{/number}","events_url":"https://api.github.com/repos/Benglin/Dynamo/events","assignees_url":"https://api.github.com/repos/Benglin/Dynamo/assignees{/user}","branches_url":"https://api.github.com/repos/Benglin/Dynamo/branches{/branch}","tags_url":"https://api.github.com/repos/Benglin/Dynamo/tags","blobs_url":"https://api.github.com/repos/Benglin/Dynamo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Benglin/Dynamo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Benglin/Dynamo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Benglin/Dynamo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Benglin/Dynamo/statuses/{sha}","languages_url":"https://api.github.com/repos/Benglin/Dynamo/languages","stargazers_url":"https://api.github.com/repos/Benglin/Dynamo/stargazers","contributors_url":"https://api.github.com/repos/Benglin/Dynamo/contributors","subscribers_url":"https://api.github.com/repos/Benglin/Dynamo/subscribers","subscription_url":"https://api.github.com/repos/Benglin/Dynamo/subscription","commits_url":"https://api.github.com/repos/Benglin/Dynamo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Benglin/Dynamo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Benglin/Dynamo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Benglin/Dynamo/issues/comments/{number}","contents_url":"https://api.github.com/repos/Benglin/Dynamo/contents/{+path}","compare_url":"https://api.github.com/repos/Benglin/Dynamo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Benglin/Dynamo/merges","archive_url":"https://api.github.com/repos/Benglin/Dynamo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Benglin/Dynamo/downloads","issues_url":"https://api.github.com/repos/Benglin/Dynamo/issues{/number}","pulls_url":"https://api.github.com/repos/Benglin/Dynamo/pulls{/number}","milestones_url":"https://api.github.com/repos/Benglin/Dynamo/milestones{/number}","notifications_url":"https://api.github.com/repos/Benglin/Dynamo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Benglin/Dynamo/labels{/name}","releases_url":"https://api.github.com/repos/Benglin/Dynamo/releases{/id}","created_at":"2013-07-26T01:54:49Z","updated_at":"2015-01-23T16:04:25Z","pushed_at":"2015-01-23T23:56:36Z","git_url":"git://github.com/Benglin/Dynamo.git","ssh_url":"git@github.com:Benglin/Dynamo.git","clone_url":"https://github.com/Benglin/Dynamo.git","svn_url":"https://github.com/Benglin/Dynamo","homepage":"http://dynamobim.org","size":751545,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Benglin/Dynamo/pulls/271"},"html":{"href":"https://github.com/Benglin/Dynamo/pull/271"},"issue":{"href":"https://api.github.com/repos/Benglin/Dynamo/issues/271"},"comments":{"href":"https://api.github.com/repos/Benglin/Dynamo/issues/271/comments"},"review_comments":{"href":"https://api.github.com/repos/Benglin/Dynamo/pulls/271/comments"},"review_comment":{"href":"https://api.github.com/repos/Benglin/Dynamo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Benglin/Dynamo/pulls/271/commits"},"statuses":{"href":"https://api.github.com/repos/Benglin/Dynamo/statuses/f05f425c6542bfc4da6725a01acf72209091f821"}}}}