{"action":"created","comment":{"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments/41691454","id":41691454,"diff_hunk":"@@ -0,0 +1,52 @@\n+// Copyright (c) .NET Foundation. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+using System.Collections.Generic;\n+using System.Threading;\n+using System.Threading.Tasks;\n+using Microsoft.WindowsAzure.Storage.Blob;\n+\n+namespace NuGet.Services.Metadata.Catalog\n+{\n+    internal static class CloudBlobStorageExtensions\n+    {\n+        public static async Task<IEnumerable<IListBlobItem>> ListBlobsAsync(this CloudBlobContainer container, CancellationToken cancellationToken, string prefix = null, bool useFlatBlobListing = false, BlobListingDetails blobListingDetails = BlobListingDetails.None, long? maxResults = null)\n+        {\n+            List<IListBlobItem> items = new List<IListBlobItem>();\n+            BlobContinuationToken token = null;\n+            do\n+            {\n+                var seg = await container.ListBlobsSegmentedAsync(prefix, useFlatBlobListing, blobListingDetails, null, token, null, null);\n+                token = seg.ContinuationToken;\n+                items.AddRange(seg.Results);\n+\n+                if (maxResults.HasValue && items.Count > maxResults.Value)\n+                {\n+                    break;\n+                }\n+            }\n+            while (token != null && !cancellationToken.IsCancellationRequested);\n+            return items;\n+        }\n+\n+\n+        public static async Task<IEnumerable<IListBlobItem>> ListBlobsAsync(this CloudBlobDirectory directory, CancellationToken cancellationToken, bool useFlatBlobListing = false, BlobListingDetails blobListingDetails = BlobListingDetails.None, long? maxResults = null)\n+        {\n+            List<IListBlobItem> items = new List<IListBlobItem>();\n+            BlobContinuationToken token = null;\n+            do\n+            {\n+                var seg = await directory.ListBlobsSegmentedAsync(useFlatBlobListing, blobListingDetails, null, token, null, null);","path":"src/Catalog/CloudBlobStorageExtensions.cs","position":39,"original_position":39,"commit_id":"0326ae02c5524857b57822926aaa4f21325f0d8e","original_commit_id":"0326ae02c5524857b57822926aaa4f21325f0d8e","user":{"login":"yishaigalatzer","id":1238711,"avatar_url":"https://avatars.githubusercontent.com/u/1238711?v=3","gravatar_id":"","url":"https://api.github.com/users/yishaigalatzer","html_url":"https://github.com/yishaigalatzer","followers_url":"https://api.github.com/users/yishaigalatzer/followers","following_url":"https://api.github.com/users/yishaigalatzer/following{/other_user}","gists_url":"https://api.github.com/users/yishaigalatzer/gists{/gist_id}","starred_url":"https://api.github.com/users/yishaigalatzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yishaigalatzer/subscriptions","organizations_url":"https://api.github.com/users/yishaigalatzer/orgs","repos_url":"https://api.github.com/users/yishaigalatzer/repos","events_url":"https://api.github.com/users/yishaigalatzer/events{/privacy}","received_events_url":"https://api.github.com/users/yishaigalatzer/received_events","type":"User","site_admin":false},"body":"use named variables for the nulls","created_at":"2015-10-10T01:48:37Z","updated_at":"2015-10-10T01:48:37Z","html_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/28#discussion_r41691454","pull_request_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments/41691454"},"html":{"href":"https://github.com/NuGet/NuGet.Services.Metadata/pull/28#discussion_r41691454"},"pull_request":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/28","id":47258590,"html_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/28","diff_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/28.diff","patch_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/28.patch","issue_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/28","number":28,"state":"open","locked":false,"title":"Integrate package delete in NuGet gallery","user":{"login":"maartenba","id":485230,"avatar_url":"https://avatars.githubusercontent.com/u/485230?v=3","gravatar_id":"","url":"https://api.github.com/users/maartenba","html_url":"https://github.com/maartenba","followers_url":"https://api.github.com/users/maartenba/followers","following_url":"https://api.github.com/users/maartenba/following{/other_user}","gists_url":"https://api.github.com/users/maartenba/gists{/gist_id}","starred_url":"https://api.github.com/users/maartenba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maartenba/subscriptions","organizations_url":"https://api.github.com/users/maartenba/orgs","repos_url":"https://api.github.com/users/maartenba/repos","events_url":"https://api.github.com/users/maartenba/events{/privacy}","received_events_url":"https://api.github.com/users/maartenba/received_events","type":"User","site_admin":false},"body":"See https://github.com/NuGet/NuGetGallery/issues/2714","created_at":"2015-10-09T10:56:58Z","updated_at":"2015-10-10T01:48:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d391023960e596ab93f253b95ace6c9b972500c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/28/commits","review_comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/28/comments","review_comment_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/28/comments","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/0326ae02c5524857b57822926aaa4f21325f0d8e","head":{"label":"NuGet:maballia-delete","ref":"maballia-delete","sha":"0326ae02c5524857b57822926aaa4f21325f0d8e","user":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"repo":{"id":16930969,"name":"NuGet.Services.Metadata","full_name":"NuGet/NuGet.Services.Metadata","owner":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NuGet/NuGet.Services.Metadata","description":"NuGet's Metadata Service","fork":false,"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata","forks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/forks","keys_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/teams","hooks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/hooks","issue_events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/events{/number}","events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/events","assignees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/assignees{/user}","branches_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/branches{/branch}","tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/tags","blobs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/languages","stargazers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/stargazers","contributors_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contributors","subscribers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscribers","subscription_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscription","commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contents/{+path}","compare_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/merges","archive_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/downloads","issues_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues{/number}","pulls_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/labels{/name}","releases_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/releases{/id}","created_at":"2014-02-18T00:00:53Z","updated_at":"2015-07-06T08:59:32Z","pushed_at":"2015-10-09T14:22:09Z","git_url":"git://github.com/NuGet/NuGet.Services.Metadata.git","ssh_url":"git@github.com:NuGet/NuGet.Services.Metadata.git","clone_url":"https://github.com/NuGet/NuGet.Services.Metadata.git","svn_url":"https://github.com/NuGet/NuGet.Services.Metadata","homepage":null,"size":6035,"stargazers_count":6,"watchers_count":6,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":6,"default_branch":"master"}},"base":{"label":"NuGet:master","ref":"master","sha":"0dfe10dac121773a4a9dc984e276fcb3b8298f8b","user":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"repo":{"id":16930969,"name":"NuGet.Services.Metadata","full_name":"NuGet/NuGet.Services.Metadata","owner":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NuGet/NuGet.Services.Metadata","description":"NuGet's Metadata Service","fork":false,"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata","forks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/forks","keys_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/teams","hooks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/hooks","issue_events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/events{/number}","events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/events","assignees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/assignees{/user}","branches_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/branches{/branch}","tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/tags","blobs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/languages","stargazers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/stargazers","contributors_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contributors","subscribers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscribers","subscription_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscription","commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contents/{+path}","compare_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/merges","archive_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/downloads","issues_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues{/number}","pulls_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/labels{/name}","releases_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/releases{/id}","created_at":"2014-02-18T00:00:53Z","updated_at":"2015-07-06T08:59:32Z","pushed_at":"2015-10-09T14:22:09Z","git_url":"git://github.com/NuGet/NuGet.Services.Metadata.git","ssh_url":"git@github.com:NuGet/NuGet.Services.Metadata.git","clone_url":"https://github.com/NuGet/NuGet.Services.Metadata.git","svn_url":"https://github.com/NuGet/NuGet.Services.Metadata","homepage":null,"size":6035,"stargazers_count":6,"watchers_count":6,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/28"},"html":{"href":"https://github.com/NuGet/NuGet.Services.Metadata/pull/28"},"issue":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/28"},"comments":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/0326ae02c5524857b57822926aaa4f21325f0d8e"}}}}