{"action":"closed","number":540,"pull_request":{"url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/540","id":40439031,"html_url":"https://github.com/DynamoDS/DynamoRevit/pull/540","diff_url":"https://github.com/DynamoDS/DynamoRevit/pull/540.diff","patch_url":"https://github.com/DynamoDS/DynamoRevit/pull/540.patch","issue_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/540","number":540,"state":"closed","locked":false,"title":"Add event handlers through a proxy for view or document events","user":{"login":"Randy-Ma","id":5584246,"avatar_url":"https://avatars.githubusercontent.com/u/5584246?v=3","gravatar_id":"","url":"https://api.github.com/users/Randy-Ma","html_url":"https://github.com/Randy-Ma","followers_url":"https://api.github.com/users/Randy-Ma/followers","following_url":"https://api.github.com/users/Randy-Ma/following{/other_user}","gists_url":"https://api.github.com/users/Randy-Ma/gists{/gist_id}","starred_url":"https://api.github.com/users/Randy-Ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Randy-Ma/subscriptions","organizations_url":"https://api.github.com/users/Randy-Ma/orgs","repos_url":"https://api.github.com/users/Randy-Ma/repos","events_url":"https://api.github.com/users/Randy-Ma/events{/privacy}","received_events_url":"https://api.github.com/users/Randy-Ma/received_events","type":"User","site_admin":false},"body":"### Purpose\r\n\r\nThe main purpose of this pull request is to avoid direct reference to the subscriber of several events: DocumentOpened, DocumentClosing, DocumentClosed, ViewActivating and ViewActivated.\r\n\r\nTo achieve this, a proxy class has been implemented which will contain six events and six member functions. The methods of the proxy object will be subscribed to the application events. The original subscriber will subscribe to the events of the proxy. The implementation of the six methods in the proxy will invoke the corresponding events.\r\n\r\nAdditionally OnApplicationIdle has been implemented which will be registered to the Idling event of the application. An public function: AddIdleAction is created so that it is possible to add some tasks which need to be run when the application is in an idle state.\r\n\r\n### Declarations\r\n\r\nCheck these if you believe they are true\r\n\r\n- [X] The code base is in a better state after this PR\r\n\r\n### Reviewers\r\n@ke-yu PTAL\r\n\r\n### FYIs\r\n@ikeough \r\n","created_at":"2015-07-21T09:39:35Z","updated_at":"2015-07-27T03:27:29Z","closed_at":"2015-07-27T03:27:29Z","merged_at":"2015-07-27T03:27:29Z","merge_commit_sha":"7bea7c61328aef890e0dfd801d1e207f49f60174","assignee":{"login":"ke-yu","id":2600379,"avatar_url":"https://avatars.githubusercontent.com/u/2600379?v=3","gravatar_id":"","url":"https://api.github.com/users/ke-yu","html_url":"https://github.com/ke-yu","followers_url":"https://api.github.com/users/ke-yu/followers","following_url":"https://api.github.com/users/ke-yu/following{/other_user}","gists_url":"https://api.github.com/users/ke-yu/gists{/gist_id}","starred_url":"https://api.github.com/users/ke-yu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ke-yu/subscriptions","organizations_url":"https://api.github.com/users/ke-yu/orgs","repos_url":"https://api.github.com/users/ke-yu/repos","events_url":"https://api.github.com/users/ke-yu/events{/privacy}","received_events_url":"https://api.github.com/users/ke-yu/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/540/commits","review_comments_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/540/comments","review_comment_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/540/comments","statuses_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/statuses/ae73f2b21cbce488f94c881e7c7a29d6768912b6","head":{"label":"Randy-Ma:Revit2014","ref":"Revit2014","sha":"ae73f2b21cbce488f94c881e7c7a29d6768912b6","user":{"login":"Randy-Ma","id":5584246,"avatar_url":"https://avatars.githubusercontent.com/u/5584246?v=3","gravatar_id":"","url":"https://api.github.com/users/Randy-Ma","html_url":"https://github.com/Randy-Ma","followers_url":"https://api.github.com/users/Randy-Ma/followers","following_url":"https://api.github.com/users/Randy-Ma/following{/other_user}","gists_url":"https://api.github.com/users/Randy-Ma/gists{/gist_id}","starred_url":"https://api.github.com/users/Randy-Ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Randy-Ma/subscriptions","organizations_url":"https://api.github.com/users/Randy-Ma/orgs","repos_url":"https://api.github.com/users/Randy-Ma/repos","events_url":"https://api.github.com/users/Randy-Ma/events{/privacy}","received_events_url":"https://api.github.com/users/Randy-Ma/received_events","type":"User","site_admin":false},"repo":{"id":27700446,"name":"DynamoRevit","full_name":"Randy-Ma/DynamoRevit","owner":{"login":"Randy-Ma","id":5584246,"avatar_url":"https://avatars.githubusercontent.com/u/5584246?v=3","gravatar_id":"","url":"https://api.github.com/users/Randy-Ma","html_url":"https://github.com/Randy-Ma","followers_url":"https://api.github.com/users/Randy-Ma/followers","following_url":"https://api.github.com/users/Randy-Ma/following{/other_user}","gists_url":"https://api.github.com/users/Randy-Ma/gists{/gist_id}","starred_url":"https://api.github.com/users/Randy-Ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Randy-Ma/subscriptions","organizations_url":"https://api.github.com/users/Randy-Ma/orgs","repos_url":"https://api.github.com/users/Randy-Ma/repos","events_url":"https://api.github.com/users/Randy-Ma/events{/privacy}","received_events_url":"https://api.github.com/users/Randy-Ma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Randy-Ma/DynamoRevit","description":"Dynamo Libraries for Revit","fork":true,"url":"https://api.github.com/repos/Randy-Ma/DynamoRevit","forks_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/forks","keys_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/teams","hooks_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/hooks","issue_events_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/issues/events{/number}","events_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/events","assignees_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/assignees{/user}","branches_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/branches{/branch}","tags_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/tags","blobs_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/git/refs{/sha}","trees_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/statuses/{sha}","languages_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/languages","stargazers_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/stargazers","contributors_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/contributors","subscribers_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/subscribers","subscription_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/subscription","commits_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/commits{/sha}","git_commits_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/git/commits{/sha}","comments_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/comments{/number}","issue_comment_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/issues/comments{/number}","contents_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/contents/{+path}","compare_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/merges","archive_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/downloads","issues_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/issues{/number}","pulls_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/pulls{/number}","milestones_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/milestones{/number}","notifications_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/labels{/name}","releases_url":"https://api.github.com/repos/Randy-Ma/DynamoRevit/releases{/id}","created_at":"2014-12-08T06:04:35Z","updated_at":"2015-05-06T06:07:34Z","pushed_at":"2015-07-23T05:43:16Z","git_url":"git://github.com/Randy-Ma/DynamoRevit.git","ssh_url":"git@github.com:Randy-Ma/DynamoRevit.git","clone_url":"https://github.com/Randy-Ma/DynamoRevit.git","svn_url":"https://github.com/Randy-Ma/DynamoRevit","homepage":"http://www.dynamobim.org","size":595321,"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":"Revit2015"}},"base":{"label":"DynamoDS:Revit2014","ref":"Revit2014","sha":"1fafbd6a6ed20e6d0203893fc5efd198a876ee90","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":22768182,"name":"DynamoRevit","full_name":"DynamoDS/DynamoRevit","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/DynamoRevit","description":"Dynamo Libraries for Revit","fork":false,"url":"https://api.github.com/repos/DynamoDS/DynamoRevit","forks_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/forks","keys_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/teams","hooks_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/hooks","issue_events_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/events{/number}","events_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/events","assignees_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/assignees{/user}","branches_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/branches{/branch}","tags_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/tags","blobs_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/refs{/sha}","trees_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/statuses/{sha}","languages_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/languages","stargazers_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/stargazers","contributors_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/contributors","subscribers_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/subscribers","subscription_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/subscription","commits_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/commits{/sha}","git_commits_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/commits{/sha}","comments_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/comments{/number}","issue_comment_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/comments{/number}","contents_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/contents/{+path}","compare_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/merges","archive_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/downloads","issues_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues{/number}","pulls_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls{/number}","milestones_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/milestones{/number}","notifications_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/labels{/name}","releases_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/releases{/id}","created_at":"2014-08-08T18:52:34Z","updated_at":"2015-07-03T21:36:52Z","pushed_at":"2015-07-27T03:27:29Z","git_url":"git://github.com/DynamoDS/DynamoRevit.git","ssh_url":"git@github.com:DynamoDS/DynamoRevit.git","clone_url":"https://github.com/DynamoDS/DynamoRevit.git","svn_url":"https://github.com/DynamoDS/DynamoRevit","homepage":"http://www.dynamobim.org","size":616010,"stargazers_count":10,"watchers_count":10,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":8,"forks":38,"open_issues":8,"watchers":10,"default_branch":"Revit2015"}},"_links":{"self":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/540"},"html":{"href":"https://github.com/DynamoDS/DynamoRevit/pull/540"},"issue":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/540"},"comments":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/540/comments"},"review_comments":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/540/comments"},"review_comment":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/540/commits"},"statuses":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/statuses/ae73f2b21cbce488f94c881e7c7a29d6768912b6"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Randy-Ma","id":5584246,"avatar_url":"https://avatars.githubusercontent.com/u/5584246?v=3","gravatar_id":"","url":"https://api.github.com/users/Randy-Ma","html_url":"https://github.com/Randy-Ma","followers_url":"https://api.github.com/users/Randy-Ma/followers","following_url":"https://api.github.com/users/Randy-Ma/following{/other_user}","gists_url":"https://api.github.com/users/Randy-Ma/gists{/gist_id}","starred_url":"https://api.github.com/users/Randy-Ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Randy-Ma/subscriptions","organizations_url":"https://api.github.com/users/Randy-Ma/orgs","repos_url":"https://api.github.com/users/Randy-Ma/repos","events_url":"https://api.github.com/users/Randy-Ma/events{/privacy}","received_events_url":"https://api.github.com/users/Randy-Ma/received_events","type":"User","site_admin":false},"comments":12,"review_comments":18,"commits":1,"additions":178,"deletions":57,"changed_files":9}}