{"action":"created","issue":{"url":"https://api.github.com/repos/filippova94/nsudotnet/issues/4","repository_url":"https://api.github.com/repos/filippova94/nsudotnet","labels_url":"https://api.github.com/repos/filippova94/nsudotnet/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/filippova94/nsudotnet/issues/4/comments","events_url":"https://api.github.com/repos/filippova94/nsudotnet/issues/4/events","html_url":"https://github.com/filippova94/nsudotnet/issues/4","id":156161242,"number":4,"title":"[LinesCounter] .Sum","user":{"login":"pavel-b-novikov","id":2521412,"avatar_url":"https://avatars.githubusercontent.com/u/2521412?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-b-novikov","html_url":"https://github.com/pavel-b-novikov","followers_url":"https://api.github.com/users/pavel-b-novikov/followers","following_url":"https://api.github.com/users/pavel-b-novikov/following{/other_user}","gists_url":"https://api.github.com/users/pavel-b-novikov/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-b-novikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-b-novikov/subscriptions","organizations_url":"https://api.github.com/users/pavel-b-novikov/orgs","repos_url":"https://api.github.com/users/pavel-b-novikov/repos","events_url":"https://api.github.com/users/pavel-b-novikov/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-b-novikov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-22T16:54:13Z","updated_at":"2016-05-22T19:45:00Z","closed_at":null,"body":"```dirs.Sum(directory => LinesInDirectory(directory));```\r\n\r\nА что будет если множество dirs пустое?"},"comment":{"url":"https://api.github.com/repos/filippova94/nsudotnet/issues/comments/220851934","html_url":"https://github.com/filippova94/nsudotnet/issues/4#issuecomment-220851934","issue_url":"https://api.github.com/repos/filippova94/nsudotnet/issues/4","id":220851934,"user":{"login":"pavel-b-novikov","id":2521412,"avatar_url":"https://avatars.githubusercontent.com/u/2521412?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-b-novikov","html_url":"https://github.com/pavel-b-novikov","followers_url":"https://api.github.com/users/pavel-b-novikov/followers","following_url":"https://api.github.com/users/pavel-b-novikov/following{/other_user}","gists_url":"https://api.github.com/users/pavel-b-novikov/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-b-novikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-b-novikov/subscriptions","organizations_url":"https://api.github.com/users/pavel-b-novikov/orgs","repos_url":"https://api.github.com/users/pavel-b-novikov/repos","events_url":"https://api.github.com/users/pavel-b-novikov/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-b-novikov/received_events","type":"User","site_admin":false},"created_at":"2016-05-22T19:45:00Z","updated_at":"2016-05-22T19:45:00Z","body":"Оу, пардон, my fault.\r\nВ общем диспозиция такова - enumerable-коллекциях эта радость действительно\r\nработает нормально и вменяемо. Однако, когда дело доходит до баз данных, то\r\nSum при пустом множестве выдает довольно неприятный exception. В данном\r\nслучае идеологически правильный вариант записи -\r\n.Select(c=>LinesCount(c)).DefaultIfEmpty(0).Sum();\r\n\r\n2016-05-23 1:38 GMT+06:00 Ekaterina Filippova <notifications@github.com>:\r\n\r\n> Или я неправильно понимаю вопрос.\r\n>\r\n> —\r\n> You are receiving this because you authored the thread.\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/filippova94/nsudotnet/issues/4#issuecomment-220851590>\r\n>\r\n\r\n\r\n\r\n-- \r\nSincerely yours,\r\nPavel B. Novikov\r\nSkype: nsu_the_cjay\r\nPhone: +7 961 872 5447\r\n"}}
{"actor":{"display_login":"pavel-b-novikov"}}