{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/9882","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/9882/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/9882/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/9882/events","html_url":"https://github.com/dotnet/roslyn/issues/9882","id":141811193,"node_id":"MDU6SXNzdWUxNDE4MTExOTM=","number":9882,"title":"tuples and disposable objects","user":{"login":"lucamorelli","id":127777,"node_id":"MDQ6VXNlcjEyNzc3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/127777?v=4","gravatar_id":"","url":"https://api.github.com/users/lucamorelli","html_url":"https://github.com/lucamorelli","followers_url":"https://api.github.com/users/lucamorelli/followers","following_url":"https://api.github.com/users/lucamorelli/following{/other_user}","gists_url":"https://api.github.com/users/lucamorelli/gists{/gist_id}","starred_url":"https://api.github.com/users/lucamorelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucamorelli/subscriptions","organizations_url":"https://api.github.com/users/lucamorelli/orgs","repos_url":"https://api.github.com/users/lucamorelli/repos","events_url":"https://api.github.com/users/lucamorelli/events{/privacy}","received_events_url":"https://api.github.com/users/lucamorelli/received_events","type":"User","site_admin":false},"labels":[{"id":169838071,"node_id":"MDU6TGFiZWwxNjk4MzgwNzE=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Language%20Design","name":"Area-Language Design","color":"5319e7","default":false},{"id":166677091,"node_id":"MDU6TGFiZWwxNjY2NzcwOTE=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Feature%20Request","name":"Feature Request","color":"e52727","default":false},{"id":332342663,"node_id":"MDU6TGFiZWwzMzIzNDI2NjM=","url":"https://api.github.com/repos/dotnet/roslyn/labels/New%20Language%20Feature%20-%20Tuples","name":"New Language Feature - Tuples","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":{"login":"MadsTorgersen","id":6677272,"node_id":"MDQ6VXNlcjY2NzcyNzI=","avatar_url":"https://avatars2.githubusercontent.com/u/6677272?v=4","gravatar_id":"","url":"https://api.github.com/users/MadsTorgersen","html_url":"https://github.com/MadsTorgersen","followers_url":"https://api.github.com/users/MadsTorgersen/followers","following_url":"https://api.github.com/users/MadsTorgersen/following{/other_user}","gists_url":"https://api.github.com/users/MadsTorgersen/gists{/gist_id}","starred_url":"https://api.github.com/users/MadsTorgersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadsTorgersen/subscriptions","organizations_url":"https://api.github.com/users/MadsTorgersen/orgs","repos_url":"https://api.github.com/users/MadsTorgersen/repos","events_url":"https://api.github.com/users/MadsTorgersen/events{/privacy}","received_events_url":"https://api.github.com/users/MadsTorgersen/received_events","type":"User","site_admin":false},"assignees":[{"login":"MadsTorgersen","id":6677272,"node_id":"MDQ6VXNlcjY2NzcyNzI=","avatar_url":"https://avatars2.githubusercontent.com/u/6677272?v=4","gravatar_id":"","url":"https://api.github.com/users/MadsTorgersen","html_url":"https://github.com/MadsTorgersen","followers_url":"https://api.github.com/users/MadsTorgersen/followers","following_url":"https://api.github.com/users/MadsTorgersen/following{/other_user}","gists_url":"https://api.github.com/users/MadsTorgersen/gists{/gist_id}","starred_url":"https://api.github.com/users/MadsTorgersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadsTorgersen/subscriptions","organizations_url":"https://api.github.com/users/MadsTorgersen/orgs","repos_url":"https://api.github.com/users/MadsTorgersen/repos","events_url":"https://api.github.com/users/MadsTorgersen/events{/privacy}","received_events_url":"https://api.github.com/users/MadsTorgersen/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/2","html_url":"https://github.com/dotnet/roslyn/milestone/2","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/2/labels","id":937398,"node_id":"MDk6TWlsZXN0b25lOTM3Mzk4","number":2,"title":"Unknown","description":"This represents work which is not planned for a specific release.\r\n\r\n<!---\r\n@huboard:{\"order\":0.25}\n-->\r\n","creator":{"login":"jaredpar","id":146967,"node_id":"MDQ6VXNlcjE0Njk2Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/146967?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"open_issues":3134,"closed_issues":504,"state":"open","created_at":"2015-01-15T20:46:02Z","updated_at":"2018-08-20T18:56:02Z","due_on":null,"closed_at":null},"comments":22,"created_at":"2016-03-18T09:10:26Z","updated_at":"2018-08-21T07:38:14Z","closed_at":null,"author_association":"NONE","body":"Hi,\n  I'm following the discussion about tuples, and I have a question about this.\n  Often I have methods the return disposable objects (the most common is a ef or ado.net db connection, and to be sure that are correctly dispose I use **using (...**\n\n```\nusing( var db = obj.getDbConnection()) {\n ...\n}\n\n```\n\nNow, if one of the members of the tuple is an object like this, how can I handle its disposal in a proper way? For example I can have a method that returns both an ado.net sqlconnection and the related transaction object, because I want to encapsulate the creation procedure.\n"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/414579893","html_url":"https://github.com/dotnet/roslyn/issues/9882#issuecomment-414579893","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/9882","id":414579893,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDU3OTg5Mw==","user":{"login":"paulomorgado","id":470455,"node_id":"MDQ6VXNlcjQ3MDQ1NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/470455?v=4","gravatar_id":"","url":"https://api.github.com/users/paulomorgado","html_url":"https://github.com/paulomorgado","followers_url":"https://api.github.com/users/paulomorgado/followers","following_url":"https://api.github.com/users/paulomorgado/following{/other_user}","gists_url":"https://api.github.com/users/paulomorgado/gists{/gist_id}","starred_url":"https://api.github.com/users/paulomorgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulomorgado/subscriptions","organizations_url":"https://api.github.com/users/paulomorgado/orgs","repos_url":"https://api.github.com/users/paulomorgado/repos","events_url":"https://api.github.com/users/paulomorgado/events{/privacy}","received_events_url":"https://api.github.com/users/paulomorgado/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T07:38:14Z","updated_at":"2018-08-21T07:38:14Z","author_association":"NONE","body":"> (BTW: Better return value would be something like Option here.)\r\n\r\n@StefanBertels, you definitely don't understand what tuples are or are forcing them to be what they aren't.\r\n Your point about an `Option` type reinforces that.\r\n\r\nAn `Option<int>` type represents something entirely different. It represents something that might or might not be an `int` whereas `(bool success, int value) ` returned by `TryParse(string text)` represents two different things: 1) whether the parsing operation was successful or not and the produced value. Exactly the same thing as if one (or both) of them was an `out` parameter."}}
{"actor":{"display_login":"paulomorgado"}}