{"action":"created","comment":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments/23663493","id":23663493,"diff_hunk":"@@ -29,6 +29,25 @@ public interface ITree<out TNodeTag, out TLeaf>\n     public static class ExtensionMethods\n     {\n         /// <summary>\n+        /// Get the index of an element in an IEnumerable\n+        /// </summary>\n+        /// <typeparam name=\"T\"></typeparam>\n+        /// <param name=\"source\">The IEnumerable</param>\n+        /// <param name=\"value\">The value for which the index is sought</param>\n+        /// <returns>Zero or greater if in the IEnumerable, otherwise -1</returns>\n+        public static int IndexOf<T>(this IEnumerable<T> source, T value)","path":"src/DynamoCore/Utilities/Extensions.cs","position":10,"original_position":10,"commit_id":"46a6039a043adc0b4e43523009e93f2c8cf224c3","original_commit_id":"46a6039a043adc0b4e43523009e93f2c8cf224c3","user":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"body":"`List<T>` has this method.  There's a method on the workspace that allows you to get the index from a Workspace argument.  This preserves that method which is out of scope.","created_at":"2015-01-28T03:19:38Z","updated_at":"2015-01-28T03:19:38Z","html_url":"https://github.com/DynamoDS/Dynamo/pull/3639#discussion_r23663493","pull_request_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/3639","_links":{"self":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments/23663493"},"html":{"href":"https://github.com/DynamoDS/Dynamo/pull/3639#discussion_r23663493"},"pull_request":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/3639"}}},"pull_request":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/3639","id":28147001,"html_url":"https://github.com/DynamoDS/Dynamo/pull/3639","diff_url":"https://github.com/DynamoDS/Dynamo/pull/3639.diff","patch_url":"https://github.com/DynamoDS/Dynamo/pull/3639.patch","issue_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/3639","number":3639,"state":"open","locked":false,"title":"MAGN-5849: Custom node created from selection does not get chance to be saved when exiting Dynamo","user":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"body":"### Issue \r\n\r\nA custom node created from selection is never added to the workspace collection.  As a result, the user never gets the chance to save it.  \r\n\r\n### Fix\r\n\r\nAdd it to the visible workspace collection!  I also made this collection read only by changing it to an IEnumerable property (as it should be).  \r\n\r\n### Tests\r\n\r\nI added a test to reproduce. All of the other custom node tests continue to work.  \r\n\r\n### Reviewer\r\n\r\n@ikeough ","created_at":"2015-01-27T21:42:14Z","updated_at":"2015-01-28T03:19:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c938d22209def64109fb94f445b98d7c82ad68ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/3639/commits","review_comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/3639/comments","review_comment_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/3639/comments","statuses_url":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/46a6039a043adc0b4e43523009e93f2c8cf224c3","head":{"label":"pboyer:number","ref":"number","sha":"46a6039a043adc0b4e43523009e93f2c8cf224c3","user":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"repo":{"id":20731728,"name":"Dynamo","full_name":"pboyer/Dynamo","owner":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pboyer/Dynamo","description":"Visual Programming For Revit","fork":true,"url":"https://api.github.com/repos/pboyer/Dynamo","forks_url":"https://api.github.com/repos/pboyer/Dynamo/forks","keys_url":"https://api.github.com/repos/pboyer/Dynamo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pboyer/Dynamo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pboyer/Dynamo/teams","hooks_url":"https://api.github.com/repos/pboyer/Dynamo/hooks","issue_events_url":"https://api.github.com/repos/pboyer/Dynamo/issues/events{/number}","events_url":"https://api.github.com/repos/pboyer/Dynamo/events","assignees_url":"https://api.github.com/repos/pboyer/Dynamo/assignees{/user}","branches_url":"https://api.github.com/repos/pboyer/Dynamo/branches{/branch}","tags_url":"https://api.github.com/repos/pboyer/Dynamo/tags","blobs_url":"https://api.github.com/repos/pboyer/Dynamo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pboyer/Dynamo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pboyer/Dynamo/git/refs{/sha}","trees_url":"https://api.github.com/repos/pboyer/Dynamo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pboyer/Dynamo/statuses/{sha}","languages_url":"https://api.github.com/repos/pboyer/Dynamo/languages","stargazers_url":"https://api.github.com/repos/pboyer/Dynamo/stargazers","contributors_url":"https://api.github.com/repos/pboyer/Dynamo/contributors","subscribers_url":"https://api.github.com/repos/pboyer/Dynamo/subscribers","subscription_url":"https://api.github.com/repos/pboyer/Dynamo/subscription","commits_url":"https://api.github.com/repos/pboyer/Dynamo/commits{/sha}","git_commits_url":"https://api.github.com/repos/pboyer/Dynamo/git/commits{/sha}","comments_url":"https://api.github.com/repos/pboyer/Dynamo/comments{/number}","issue_comment_url":"https://api.github.com/repos/pboyer/Dynamo/issues/comments/{number}","contents_url":"https://api.github.com/repos/pboyer/Dynamo/contents/{+path}","compare_url":"https://api.github.com/repos/pboyer/Dynamo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pboyer/Dynamo/merges","archive_url":"https://api.github.com/repos/pboyer/Dynamo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pboyer/Dynamo/downloads","issues_url":"https://api.github.com/repos/pboyer/Dynamo/issues{/number}","pulls_url":"https://api.github.com/repos/pboyer/Dynamo/pulls{/number}","milestones_url":"https://api.github.com/repos/pboyer/Dynamo/milestones{/number}","notifications_url":"https://api.github.com/repos/pboyer/Dynamo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pboyer/Dynamo/labels{/name}","releases_url":"https://api.github.com/repos/pboyer/Dynamo/releases{/id}","created_at":"2014-06-11T16:06:09Z","updated_at":"2014-10-31T13:56:40Z","pushed_at":"2015-01-27T21:08:49Z","git_url":"git://github.com/pboyer/Dynamo.git","ssh_url":"git@github.com:pboyer/Dynamo.git","clone_url":"https://github.com/pboyer/Dynamo.git","svn_url":"https://github.com/pboyer/Dynamo","homepage":"http://dynamobim.org","size":682620,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"DynamoDS:master","ref":"master","sha":"d8965b8af65c017c1f6e900e9e909afaaf09e1b1","user":{"login":"DynamoDS","id":6528209,"avatar_url":"https://avatars.githubusercontent.com/u/6528209?v=3","gravatar_id":"","url":"https://api.github.com/users/DynamoDS","html_url":"https://github.com/DynamoDS","followers_url":"https://api.github.com/users/DynamoDS/followers","following_url":"https://api.github.com/users/DynamoDS/following{/other_user}","gists_url":"https://api.github.com/users/DynamoDS/gists{/gist_id}","starred_url":"https://api.github.com/users/DynamoDS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DynamoDS/subscriptions","organizations_url":"https://api.github.com/users/DynamoDS/orgs","repos_url":"https://api.github.com/users/DynamoDS/repos","events_url":"https://api.github.com/users/DynamoDS/events{/privacy}","received_events_url":"https://api.github.com/users/DynamoDS/received_events","type":"Organization","site_admin":false},"repo":{"id":3395179,"name":"Dynamo","full_name":"DynamoDS/Dynamo","owner":{"login":"DynamoDS","id":6528209,"avatar_url":"https://avatars.githubusercontent.com/u/6528209?v=3","gravatar_id":"","url":"https://api.github.com/users/DynamoDS","html_url":"https://github.com/DynamoDS","followers_url":"https://api.github.com/users/DynamoDS/followers","following_url":"https://api.github.com/users/DynamoDS/following{/other_user}","gists_url":"https://api.github.com/users/DynamoDS/gists{/gist_id}","starred_url":"https://api.github.com/users/DynamoDS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DynamoDS/subscriptions","organizations_url":"https://api.github.com/users/DynamoDS/orgs","repos_url":"https://api.github.com/users/DynamoDS/repos","events_url":"https://api.github.com/users/DynamoDS/events{/privacy}","received_events_url":"https://api.github.com/users/DynamoDS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DynamoDS/Dynamo","description":"Visual Programming","fork":false,"url":"https://api.github.com/repos/DynamoDS/Dynamo","forks_url":"https://api.github.com/repos/DynamoDS/Dynamo/forks","keys_url":"https://api.github.com/repos/DynamoDS/Dynamo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DynamoDS/Dynamo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DynamoDS/Dynamo/teams","hooks_url":"https://api.github.com/repos/DynamoDS/Dynamo/hooks","issue_events_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/events{/number}","events_url":"https://api.github.com/repos/DynamoDS/Dynamo/events","assignees_url":"https://api.github.com/repos/DynamoDS/Dynamo/assignees{/user}","branches_url":"https://api.github.com/repos/DynamoDS/Dynamo/branches{/branch}","tags_url":"https://api.github.com/repos/DynamoDS/Dynamo/tags","blobs_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/refs{/sha}","trees_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/{sha}","languages_url":"https://api.github.com/repos/DynamoDS/Dynamo/languages","stargazers_url":"https://api.github.com/repos/DynamoDS/Dynamo/stargazers","contributors_url":"https://api.github.com/repos/DynamoDS/Dynamo/contributors","subscribers_url":"https://api.github.com/repos/DynamoDS/Dynamo/subscribers","subscription_url":"https://api.github.com/repos/DynamoDS/Dynamo/subscription","commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/commits{/sha}","git_commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/commits{/sha}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/comments{/number}","issue_comment_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/comments/{number}","contents_url":"https://api.github.com/repos/DynamoDS/Dynamo/contents/{+path}","compare_url":"https://api.github.com/repos/DynamoDS/Dynamo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DynamoDS/Dynamo/merges","archive_url":"https://api.github.com/repos/DynamoDS/Dynamo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DynamoDS/Dynamo/downloads","issues_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues{/number}","pulls_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls{/number}","milestones_url":"https://api.github.com/repos/DynamoDS/Dynamo/milestones{/number}","notifications_url":"https://api.github.com/repos/DynamoDS/Dynamo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DynamoDS/Dynamo/labels{/name}","releases_url":"https://api.github.com/repos/DynamoDS/Dynamo/releases{/id}","created_at":"2012-02-09T07:35:33Z","updated_at":"2015-01-27T19:45:21Z","pushed_at":"2015-01-27T19:45:21Z","git_url":"git://github.com/DynamoDS/Dynamo.git","ssh_url":"git@github.com:DynamoDS/Dynamo.git","clone_url":"https://github.com/DynamoDS/Dynamo.git","svn_url":"https://github.com/DynamoDS/Dynamo","homepage":"http://dynamobim.org","size":874847,"stargazers_count":191,"watchers_count":191,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":133,"mirror_url":null,"open_issues_count":500,"forks":133,"open_issues":500,"watchers":191,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/3639"},"html":{"href":"https://github.com/DynamoDS/Dynamo/pull/3639"},"issue":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/issues/3639"},"comments":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/issues/3639/comments"},"review_comments":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/3639/comments"},"review_comment":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/3639/commits"},"statuses":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/46a6039a043adc0b4e43523009e93f2c8cf224c3"}}}}