{"action":"created","comment":{"url":"https://api.github.com/repos/Particular/NServiceBus/pulls/comments/40894562","id":40894562,"diff_hunk":"@@ -0,0 +1,44 @@\n+namespace NServiceBus.Transports\n+{\n+    using System;\n+    using System.Collections.Generic;\n+    using System.Linq;\n+    using NServiceBus.DeliveryConstraints;\n+\n+    /// <summary>\n+    /// A collection of delivery constraints.\n+    /// </summary>\n+    public class DeliveryConstraintCollection\n+    {\n+        List<DeliveryConstraint> constraints;\n+\n+        internal DeliveryConstraintCollection(IEnumerable<DeliveryConstraint> constraints)\n+        {\n+            this.constraints = constraints.ToList();\n+        }\n+\n+        /// <summary>\n+        /// Tries to get and remove constraint of a given type.\n+        /// </summary>\n+        /// <typeparam name=\"T\">Requested type.</typeparam>\n+        /// <param name=\"constraint\">Returned constraint or null.</param>\n+        /// <returns>Success or failure</returns>\n+        public bool TryRemove<T>(out T constraint) where T : DeliveryConstraint","path":"src/NServiceBus.Core/Transports/DeliveryConstraintCollection.cs","position":26,"original_position":26,"commit_id":"eda36d222cad9264163f5bb5439a3f8d41eb4aad","original_commit_id":"eda36d222cad9264163f5bb5439a3f8d41eb4aad","user":{"login":"SzymonPobiega","id":163318,"avatar_url":"https://avatars.githubusercontent.com/u/163318?v=3","gravatar_id":"","url":"https://api.github.com/users/SzymonPobiega","html_url":"https://github.com/SzymonPobiega","followers_url":"https://api.github.com/users/SzymonPobiega/followers","following_url":"https://api.github.com/users/SzymonPobiega/following{/other_user}","gists_url":"https://api.github.com/users/SzymonPobiega/gists{/gist_id}","starred_url":"https://api.github.com/users/SzymonPobiega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SzymonPobiega/subscriptions","organizations_url":"https://api.github.com/users/SzymonPobiega/orgs","repos_url":"https://api.github.com/users/SzymonPobiega/repos","events_url":"https://api.github.com/users/SzymonPobiega/events{/privacy}","received_events_url":"https://api.github.com/users/SzymonPobiega/received_events","type":"User","site_admin":false},"body":"I am fine with `Maybe` if we all agree this is the way to go. While I don't have any strong opinions, my weak opinion is use whatever idioms the language provides. Since C# is not a functional language, I would default to `out`.","created_at":"2015-10-01T09:29:53Z","updated_at":"2015-10-01T09:29:53Z","html_url":"https://github.com/Particular/NServiceBus/pull/2934#discussion_r40894562","pull_request_url":"https://api.github.com/repos/Particular/NServiceBus/pulls/2934","_links":{"self":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/comments/40894562"},"html":{"href":"https://github.com/Particular/NServiceBus/pull/2934#discussion_r40894562"},"pull_request":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/2934"}}},"pull_request":{"url":"https://api.github.com/repos/Particular/NServiceBus/pulls/2934","id":46326498,"html_url":"https://github.com/Particular/NServiceBus/pull/2934","diff_url":"https://github.com/Particular/NServiceBus/pull/2934.diff","patch_url":"https://github.com/Particular/NServiceBus/pull/2934.patch","issue_url":"https://api.github.com/repos/Particular/NServiceBus/issues/2934","number":2934,"state":"open","locked":false,"title":"Clean up DelayedDelivery feature","user":{"login":"SzymonPobiega","id":163318,"avatar_url":"https://avatars.githubusercontent.com/u/163318?v=3","gravatar_id":"","url":"https://api.github.com/users/SzymonPobiega","html_url":"https://github.com/SzymonPobiega","followers_url":"https://api.github.com/users/SzymonPobiega/followers","following_url":"https://api.github.com/users/SzymonPobiega/following{/other_user}","gists_url":"https://api.github.com/users/SzymonPobiega/gists{/gist_id}","starred_url":"https://api.github.com/users/SzymonPobiega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SzymonPobiega/subscriptions","organizations_url":"https://api.github.com/users/SzymonPobiega/orgs","repos_url":"https://api.github.com/users/SzymonPobiega/repos","events_url":"https://api.github.com/users/SzymonPobiega/events{/privacy}","received_events_url":"https://api.github.com/users/SzymonPobiega/received_events","type":"User","site_admin":false},"body":"The purpose of this PR is to clean up the DelayedDelivery feature and its relation to TimeoutManager feature. Changes include:\r\n * Making handling of delivery constraints mandatory. If there are unhandled constraints after dispatching is done, an exception is thrown\r\n * Making handling of extension state objects mandatory. Each extension state inheriting from `OutgoingPipelineExtensionState` will be checked after the message is dispatched. If the object is not marked as *handled* by a corresponding behavior, an exception will be thrown\r\n * Merging TimeoutManager and DelayedDelivery features\r\n * Making DelayedDelivery state show the actual state of the feature (previously the feature was always reported to be enabled, even when not configured). If this feature is disabled, all attempts to defer a message will result in an error. If it is enabled, they will succeed.","created_at":"2015-09-29T20:18:33Z","updated_at":"2015-10-01T09:29:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"588148174ed38bcc20c3e6a660161d41a518d0aa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Particular/NServiceBus/pulls/2934/commits","review_comments_url":"https://api.github.com/repos/Particular/NServiceBus/pulls/2934/comments","review_comment_url":"https://api.github.com/repos/Particular/NServiceBus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/issues/2934/comments","statuses_url":"https://api.github.com/repos/Particular/NServiceBus/statuses/eda36d222cad9264163f5bb5439a3f8d41eb4aad","head":{"label":"Particular:clean-up-delayed-delivery","ref":"clean-up-delayed-delivery","sha":"eda36d222cad9264163f5bb5439a3f8d41eb4aad","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":1056713,"name":"NServiceBus","full_name":"Particular/NServiceBus","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/NServiceBus","description":"The most popular service bus for .NET","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus","forks_url":"https://api.github.com/repos/Particular/NServiceBus/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus/releases{/id}","created_at":"2010-11-06T12:54:52Z","updated_at":"2015-09-30T07:31:19Z","pushed_at":"2015-10-01T08:50:42Z","git_url":"git://github.com/Particular/NServiceBus.git","ssh_url":"git@github.com:Particular/NServiceBus.git","clone_url":"https://github.com/Particular/NServiceBus.git","svn_url":"https://github.com/Particular/NServiceBus","homepage":"http://particular.net/nservicebus","size":230418,"stargazers_count":783,"watchers_count":783,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":439,"mirror_url":null,"open_issues_count":155,"forks":439,"open_issues":155,"watchers":783,"default_branch":"develop"}},"base":{"label":"Particular:develop","ref":"develop","sha":"2bce5cd85141c31c736c5248ea6fae0dd9ff7f00","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":1056713,"name":"NServiceBus","full_name":"Particular/NServiceBus","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/NServiceBus","description":"The most popular service bus for .NET","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus","forks_url":"https://api.github.com/repos/Particular/NServiceBus/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus/releases{/id}","created_at":"2010-11-06T12:54:52Z","updated_at":"2015-09-30T07:31:19Z","pushed_at":"2015-10-01T08:50:42Z","git_url":"git://github.com/Particular/NServiceBus.git","ssh_url":"git@github.com:Particular/NServiceBus.git","clone_url":"https://github.com/Particular/NServiceBus.git","svn_url":"https://github.com/Particular/NServiceBus","homepage":"http://particular.net/nservicebus","size":230418,"stargazers_count":783,"watchers_count":783,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":439,"mirror_url":null,"open_issues_count":155,"forks":439,"open_issues":155,"watchers":783,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/2934"},"html":{"href":"https://github.com/Particular/NServiceBus/pull/2934"},"issue":{"href":"https://api.github.com/repos/Particular/NServiceBus/issues/2934"},"comments":{"href":"https://api.github.com/repos/Particular/NServiceBus/issues/2934/comments"},"review_comments":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/2934/comments"},"review_comment":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/2934/commits"},"statuses":{"href":"https://api.github.com/repos/Particular/NServiceBus/statuses/eda36d222cad9264163f5bb5439a3f8d41eb4aad"}}}}