{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/comments/56933854","id":56933854,"diff_hunk":"@@ -0,0 +1,63 @@\n+﻿using Microsoft.Azure.WebJobs;\n+using Microsoft.Azure.WebJobs.Host.Bindings;\n+using Microsoft.Azure.WebJobs.Host.Bindings.Path;\n+using Microsoft.Azure.WebJobs.Host.Config;\n+using Microsoft.Azure.WebJobs.Host.Protocols;\n+using System;\n+using System.Collections.Generic;\n+using System.Globalization;\n+using System.IO;\n+using System.Linq;\n+using System.Reflection;\n+using System.Text;\n+using System.Threading.Tasks;\n+using System.Threading;\n+using Microsoft.Azure.WebJobs.Host.Triggers;\n+using Microsoft.Azure.WebJobs.Host.Listeners;\n+using Microsoft.Azure.WebJobs.Host.Executors;\n+\n+namespace Microsoft.Azure.WebJobs.Extensions.ApiHub.Common\n+{\n+    // File Triggers implement this.\n+    public interface IFileTriggerStrategy<TFile>\n+    {\n+        // Get the path from the file. \n+        string GetPath(TFile file);\n+\n+        // Get the binding contract. Mutable so that we can add to this. \n+        void GetStaticBindingContract(IDictionary<string, Type> contract);\n+\n+        // Add runtime information to the contract. \n+        void GetRuntimeBindingContract(TFile file, IDictionary<string, object> contract);\n+    }\n+\n+    // Provde Read/Write streams. \n+    // $$$ cOuld this be rationalized with IConverter?\n+    public interface IFileStreamProvider\n+    {\n+        // Get a stream that reads from the source.\n+        Task<Stream> OpenReadStreamAsync();\n+\n+        // Stream and a \"Completion\" function to be called when finished writing to the stream. \n+        // That can be used to flush results. \n+        // Technically, the a derived stream could override Close() to call OnComplete, but that's \n+        // hard for callers to implement. \n+        Task<Tuple<Stream, Func<Task>>> OpenWriteStreamAsync();\n+    }\n+\n+    // Provide a way to get to the  common file-properties on file attributes. \n+    public interface IFileAttribute\n+    {\n+        // Path with resolution \n+        // allow set so we can update this attribute with resolved parameters. \n+        string Path { get; set; }\n+        FileAccess Access { get; }\n+    }\n+\n+    // Provide backdoor so that trigger binder can call regular binder and have consistent semantics. \n+    // $$$ Only needed because Core-sdk ","path":"src/WebJobs.Extensions.ApiHub/Common/CodeFile2.cs","position":58,"original_position":58,"commit_id":"4fb97ffec59583d115166d733f4c71500b60a1c6","original_commit_id":"4fb97ffec59583d115166d733f4c71500b60a1c6","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":"? Unfinished comment TODO?","created_at":"2016-03-22T03:44:39Z","updated_at":"2016-03-22T03:44:39Z","html_url":"https://github.com/Azure/azure-webjobs-sdk-extensions/pull/58#discussion_r56933854","pull_request_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/comments/56933854"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-extensions/pull/58#discussion_r56933854"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/58","id":63657505,"html_url":"https://github.com/Azure/azure-webjobs-sdk-extensions/pull/58","diff_url":"https://github.com/Azure/azure-webjobs-sdk-extensions/pull/58.diff","patch_url":"https://github.com/Azure/azure-webjobs-sdk-extensions/pull/58.patch","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/58","number":58,"state":"open","locked":false,"title":"Apihub changes","user":{"login":"galcho","id":5711535,"avatar_url":"https://avatars.githubusercontent.com/u/5711535?v=3","gravatar_id":"","url":"https://api.github.com/users/galcho","html_url":"https://github.com/galcho","followers_url":"https://api.github.com/users/galcho/followers","following_url":"https://api.github.com/users/galcho/following{/other_user}","gists_url":"https://api.github.com/users/galcho/gists{/gist_id}","starred_url":"https://api.github.com/users/galcho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galcho/subscriptions","organizations_url":"https://api.github.com/users/galcho/orgs","repos_url":"https://api.github.com/users/galcho/repos","events_url":"https://api.github.com/users/galcho/events{/privacy}","received_events_url":"https://api.github.com/users/galcho/received_events","type":"User","site_admin":false},"body":"Finished:    Microsoft.Azure.WebJobs.Extensions.Tests\r\n  === TEST EXECUTION SUMMARY ===\r\n     Microsoft.Azure.WebJobs.Extensions.Tests  Total: 330, Errors: 0, Failed: 0, Skipped: 0, Time: 209.845s","created_at":"2016-03-22T01:19:09Z","updated_at":"2016-03-22T03:44:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a6f19243d8310501b3ffeeede0ac6cb27c8a579","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/58/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/58/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/58/comments","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/statuses/4fb97ffec59583d115166d733f4c71500b60a1c6","head":{"label":"Azure:apihub","ref":"apihub","sha":"4fb97ffec59583d115166d733f4c71500b60a1c6","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":36027231,"name":"azure-webjobs-sdk-extensions","full_name":"Azure/azure-webjobs-sdk-extensions","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-extensions","description":"Azure WebJobs SDK Extensions","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/deployments","created_at":"2015-05-21T17:28:25Z","updated_at":"2016-03-10T14:32:16Z","pushed_at":"2016-03-22T02:27:46Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-extensions.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-extensions.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-extensions.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-extensions","homepage":"","size":939,"stargazers_count":41,"watchers_count":41,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":14,"forks":21,"open_issues":14,"watchers":41,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"055b178a173c0ec380b718e5238de0bcfe261cfe","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":36027231,"name":"azure-webjobs-sdk-extensions","full_name":"Azure/azure-webjobs-sdk-extensions","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-extensions","description":"Azure WebJobs SDK Extensions","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/deployments","created_at":"2015-05-21T17:28:25Z","updated_at":"2016-03-10T14:32:16Z","pushed_at":"2016-03-22T02:27:46Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-extensions.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-extensions.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-extensions.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-extensions","homepage":"","size":939,"stargazers_count":41,"watchers_count":41,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":14,"forks":21,"open_issues":14,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/58"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-extensions/pull/58"},"issue":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/58"},"comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/statuses/4fb97ffec59583d115166d733f4c71500b60a1c6"}}}}