{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments/54124091","id":54124091,"diff_hunk":"@@ -0,0 +1,46 @@\n+﻿// Copyright (c) .NET Foundation. All rights reserved.\n+// Licensed under the MIT License. See License.txt in the project root for license information.\n+\n+using Microsoft.Azure.WebJobs.ServiceBus;\n+using System;\n+\n+namespace Microsoft.Azure.WebJobs.Script.Description\n+{\n+    public class EventHubBindingMetadata : BindingMetadata\n+    {\n+        [AllowNameResolution]\n+        public string ConnectionString { get; set; }\n+\n+        [AllowNameResolution]\n+        public string Path { get; set; }\n+\n+        public override void ApplyToConfig(JobHostConfigurationBuilder configBuilder)\n+        {\n+            EventHubConfiguration eventHubConfig = configBuilder.EventHubConfiguration;\n+\n+            if (this.IsTrigger)\n+            {\n+                string eventProcessorHostName = Guid.NewGuid().ToString();\n+\n+                string storageConnectionString = configBuilder.Config.StorageConnectionString;\n+\n+                var eventProcessorHost = new Microsoft.ServiceBus.Messaging.EventProcessorHost(\n+                     eventProcessorHostName,\n+                     this.Path,\n+                     Microsoft.ServiceBus.Messaging.EventHubConsumerGroup.DefaultGroupName,\n+                     this.ConnectionString,\n+                     storageConnectionString);\n+\n+                eventHubConfig.AddEventProcessorHost(this.Path, eventProcessorHost);","path":"src/WebJobs.Script/Description/EventHubBindingMetadata.cs","position":34,"original_position":34,"commit_id":"3d8b9a8a4fb5c8c50af85096a05f707ea9f5cc73","original_commit_id":"3d8b9a8a4fb5c8c50af85096a05f707ea9f5cc73","user":{"login":"mathewc","id":1056548,"avatar_url":"https://avatars.githubusercontent.com/u/1056548?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewc","html_url":"https://github.com/mathewc","followers_url":"https://api.github.com/users/mathewc/followers","following_url":"https://api.github.com/users/mathewc/following{/other_user}","gists_url":"https://api.github.com/users/mathewc/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewc/subscriptions","organizations_url":"https://api.github.com/users/mathewc/orgs","repos_url":"https://api.github.com/users/mathewc/repos","events_url":"https://api.github.com/users/mathewc/events{/privacy}","received_events_url":"https://api.github.com/users/mathewc/received_events","type":"User","site_admin":false},"body":"Why isn't this logic in the core SDK? I'd expect the underlying EH attributes/listeners to set themselves up properly in SDK core, with us getting all that for free.","created_at":"2016-02-25T16:41:06Z","updated_at":"2016-02-25T16:41:06Z","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/26#discussion_r54124091","pull_request_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments/54124091"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-script/pull/26#discussion_r54124091"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/26","id":60013502,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/26","diff_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/26.diff","patch_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/26.patch","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/26","number":26,"state":"open","locked":false,"title":"EventHub support in scripting.","user":{"login":"MikeStall","id":1538900,"avatar_url":"https://avatars.githubusercontent.com/u/1538900?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeStall","html_url":"https://github.com/MikeStall","followers_url":"https://api.github.com/users/MikeStall/followers","following_url":"https://api.github.com/users/MikeStall/following{/other_user}","gists_url":"https://api.github.com/users/MikeStall/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeStall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeStall/subscriptions","organizations_url":"https://api.github.com/users/MikeStall/orgs","repos_url":"https://api.github.com/users/MikeStall/repos","events_url":"https://api.github.com/users/MikeStall/events{/privacy}","received_events_url":"https://api.github.com/users/MikeStall/received_events","type":"User","site_admin":false},"body":"This needs an updated WebJobs.ServiceBus nuget package.\r\nScript.Host.CsProj assembly references are broken while waiting for a nuget package publish.\r\nI'll fix that before committing the pull request. ","created_at":"2016-02-19T21:58:18Z","updated_at":"2016-02-25T16:41:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bbed0162bed23937ede53c197bcd8017ed02172","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/26/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/26/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/26/comments","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/3d8b9a8a4fb5c8c50af85096a05f707ea9f5cc73","head":{"label":"Azure:eh","ref":"eh","sha":"3d8b9a8a4fb5c8c50af85096a05f707ea9f5cc73","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":42548553,"name":"azure-webjobs-sdk-script","full_name":"Azure/azure-webjobs-sdk-script","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script","description":"Scripting the Azure WebJobs SDK","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/deployments","created_at":"2015-09-15T21:48:19Z","updated_at":"2016-02-17T20:06:22Z","pushed_at":"2016-02-25T05:45:56Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-script.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-script.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-script.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-script","homepage":"","size":14023,"stargazers_count":16,"watchers_count":16,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":17,"forks":6,"open_issues":17,"watchers":16,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"707446e60fd1a07f002443990da816b10dd83988","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":42548553,"name":"azure-webjobs-sdk-script","full_name":"Azure/azure-webjobs-sdk-script","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script","description":"Scripting the Azure WebJobs SDK","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/deployments","created_at":"2015-09-15T21:48:19Z","updated_at":"2016-02-17T20:06:22Z","pushed_at":"2016-02-25T05:45:56Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-script.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-script.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-script.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-script","homepage":"","size":14023,"stargazers_count":16,"watchers_count":16,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":17,"forks":6,"open_issues":17,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/26"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-script/pull/26"},"issue":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/26"},"comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/3d8b9a8a4fb5c8c50af85096a05f707ea9f5cc73"}}}}