{"action":"created","comment":{"url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/comments/31064455","id":31064455,"diff_hunk":"@@ -0,0 +1,171 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Text;\n+using System.Threading.Tasks;\n+\n+namespace LinkedListClass\n+{\n+    public class LinkedList<T>\n+    {\n+        class ListElement\n+        {\n+            public T Value { get; set; }\n+            public ListElement Next { get; set; }\n+        }\n+\n+        /// <summary>\n+        /// Add element to list.\n+        /// </summary>\n+        /// <param name=\"value\"></param>\n+        public void AddElement(T value)\n+        {\n+            var newElement = new ListElement()\n+            {\n+                Value = value,\n+                Next = null\n+            };\n+\n+            if (head == null)\n+            {\n+                head = newElement;\n+                return;\n+            }\n+\n+            var currentElement = head;\n+            while (currentElement.Next != null)\n+            {\n+                currentElement = currentElement.Next;\n+            }\n+            currentElement.Next = newElement;\n+        }\n+\n+        /// <summary>\n+        /// Add element if it is not in list.\n+        /// </summary>\n+        /// <param name=\"value\"></param>\n+        public void AddUniqueElement(T value)\n+        {\n+            var newElement = new ListElement()\n+            {\n+                Value = value,\n+                Next = null\n+            };\n+\n+            if (head == null)\n+            {\n+                head = newElement;\n+                return;\n+            }\n+\n+            Comparer<T> comparer = Comparer<T>.Default;\n+\n+            if (comparer.Compare(head.Value, value) == 0)\n+            {\n+                return;\n+            }\n+\n+            var currentElement = head;\n+            while (currentElement.Next != null)\n+            {\n+                if (comparer.Compare(currentElement.Next.Value, value) == 0)\n+                {\n+                    return;\n+                }\n+                currentElement = currentElement.Next;\n+            }\n+            currentElement.Next = newElement;            \n+        }\n+\n+        /// <summary>\n+        /// Remove element from list.\n+        /// </summary>\n+        /// <returns></returns>\n+        public T RemoveElement()\n+        {\n+            if (head == null)\n+            {\n+                throw new RemoveFromEmptyListException(\"You tried to remove element from empty list.\");","path":"Semester2/HW_2/Task2/LinkedListClass/LinkedListClass/LinkedListClass/LinkedList.cs","position":88,"original_position":88,"commit_id":"dae80cf4cca760ade313b2873f96a1b6826d920c","original_commit_id":"dae80cf4cca760ade313b2873f96a1b6826d920c","user":{"login":"yurii-litvinov","id":706768,"avatar_url":"https://avatars.githubusercontent.com/u/706768?v=3","gravatar_id":"","url":"https://api.github.com/users/yurii-litvinov","html_url":"https://github.com/yurii-litvinov","followers_url":"https://api.github.com/users/yurii-litvinov/followers","following_url":"https://api.github.com/users/yurii-litvinov/following{/other_user}","gists_url":"https://api.github.com/users/yurii-litvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/yurii-litvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurii-litvinov/subscriptions","organizations_url":"https://api.github.com/users/yurii-litvinov/orgs","repos_url":"https://api.github.com/users/yurii-litvinov/repos","events_url":"https://api.github.com/users/yurii-litvinov/events{/privacy}","received_events_url":"https://api.github.com/users/yurii-litvinov/received_events","type":"User","site_admin":false},"body":"тут тоже мне кажется лишним строковое сообщение, по имени класса с исключением всё должно быть понятно","created_at":"2015-05-26T18:31:42Z","updated_at":"2015-05-26T18:31:42Z","html_url":"https://github.com/IvanZheleznyakov/SPBUworks/pull/5#discussion_r31064455","pull_request_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/comments/31064455"},"html":{"href":"https://github.com/IvanZheleznyakov/SPBUworks/pull/5#discussion_r31064455"},"pull_request":{"href":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/5","id":35238132,"html_url":"https://github.com/IvanZheleznyakov/SPBUworks/pull/5","diff_url":"https://github.com/IvanZheleznyakov/SPBUworks/pull/5.diff","patch_url":"https://github.com/IvanZheleznyakov/SPBUworks/pull/5.patch","issue_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues/5","number":5,"state":"open","locked":false,"title":"Added new methods","user":{"login":"IvanZheleznyakov","id":10994784,"avatar_url":"https://avatars.githubusercontent.com/u/10994784?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanZheleznyakov","html_url":"https://github.com/IvanZheleznyakov","followers_url":"https://api.github.com/users/IvanZheleznyakov/followers","following_url":"https://api.github.com/users/IvanZheleznyakov/following{/other_user}","gists_url":"https://api.github.com/users/IvanZheleznyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanZheleznyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanZheleznyakov/subscriptions","organizations_url":"https://api.github.com/users/IvanZheleznyakov/orgs","repos_url":"https://api.github.com/users/IvanZheleznyakov/repos","events_url":"https://api.github.com/users/IvanZheleznyakov/events{/privacy}","received_events_url":"https://api.github.com/users/IvanZheleznyakov/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-12T15:24:46Z","updated_at":"2015-05-26T18:31:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b402cde380e77705c9af81d493fcd0915cf6b254","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/5/commits","review_comments_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/5/comments","review_comment_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues/5/comments","statuses_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/statuses/dae80cf4cca760ade313b2873f96a1b6826d920c","head":{"label":"IvanZheleznyakov:branch_for_hw2_task2","ref":"branch_for_hw2_task2","sha":"dae80cf4cca760ade313b2873f96a1b6826d920c","user":{"login":"IvanZheleznyakov","id":10994784,"avatar_url":"https://avatars.githubusercontent.com/u/10994784?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanZheleznyakov","html_url":"https://github.com/IvanZheleznyakov","followers_url":"https://api.github.com/users/IvanZheleznyakov/followers","following_url":"https://api.github.com/users/IvanZheleznyakov/following{/other_user}","gists_url":"https://api.github.com/users/IvanZheleznyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanZheleznyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanZheleznyakov/subscriptions","organizations_url":"https://api.github.com/users/IvanZheleznyakov/orgs","repos_url":"https://api.github.com/users/IvanZheleznyakov/repos","events_url":"https://api.github.com/users/IvanZheleznyakov/events{/privacy}","received_events_url":"https://api.github.com/users/IvanZheleznyakov/received_events","type":"User","site_admin":false},"repo":{"id":32740965,"name":"SPBUworks","full_name":"IvanZheleznyakov/SPBUworks","owner":{"login":"IvanZheleznyakov","id":10994784,"avatar_url":"https://avatars.githubusercontent.com/u/10994784?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanZheleznyakov","html_url":"https://github.com/IvanZheleznyakov","followers_url":"https://api.github.com/users/IvanZheleznyakov/followers","following_url":"https://api.github.com/users/IvanZheleznyakov/following{/other_user}","gists_url":"https://api.github.com/users/IvanZheleznyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanZheleznyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanZheleznyakov/subscriptions","organizations_url":"https://api.github.com/users/IvanZheleznyakov/orgs","repos_url":"https://api.github.com/users/IvanZheleznyakov/repos","events_url":"https://api.github.com/users/IvanZheleznyakov/events{/privacy}","received_events_url":"https://api.github.com/users/IvanZheleznyakov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IvanZheleznyakov/SPBUworks","description":"My homeworks","fork":false,"url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks","forks_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/forks","keys_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/teams","hooks_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/hooks","issue_events_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues/events{/number}","events_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/events","assignees_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/assignees{/user}","branches_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/branches{/branch}","tags_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/tags","blobs_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/statuses/{sha}","languages_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/languages","stargazers_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/stargazers","contributors_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/contributors","subscribers_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/subscribers","subscription_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/subscription","commits_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/contents/{+path}","compare_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/merges","archive_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/downloads","issues_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues{/number}","pulls_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls{/number}","milestones_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/milestones{/number}","notifications_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/labels{/name}","releases_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/releases{/id}","created_at":"2015-03-23T15:30:10Z","updated_at":"2015-05-06T19:19:41Z","pushed_at":"2015-05-26T16:15:06Z","git_url":"git://github.com/IvanZheleznyakov/SPBUworks.git","ssh_url":"git@github.com:IvanZheleznyakov/SPBUworks.git","clone_url":"https://github.com/IvanZheleznyakov/SPBUworks.git","svn_url":"https://github.com/IvanZheleznyakov/SPBUworks","homepage":null,"size":532,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":0,"default_branch":"master"}},"base":{"label":"IvanZheleznyakov:master","ref":"master","sha":"73af29ab9766c9fb95c1e68dac7c19cd6f95b243","user":{"login":"IvanZheleznyakov","id":10994784,"avatar_url":"https://avatars.githubusercontent.com/u/10994784?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanZheleznyakov","html_url":"https://github.com/IvanZheleznyakov","followers_url":"https://api.github.com/users/IvanZheleznyakov/followers","following_url":"https://api.github.com/users/IvanZheleznyakov/following{/other_user}","gists_url":"https://api.github.com/users/IvanZheleznyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanZheleznyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanZheleznyakov/subscriptions","organizations_url":"https://api.github.com/users/IvanZheleznyakov/orgs","repos_url":"https://api.github.com/users/IvanZheleznyakov/repos","events_url":"https://api.github.com/users/IvanZheleznyakov/events{/privacy}","received_events_url":"https://api.github.com/users/IvanZheleznyakov/received_events","type":"User","site_admin":false},"repo":{"id":32740965,"name":"SPBUworks","full_name":"IvanZheleznyakov/SPBUworks","owner":{"login":"IvanZheleznyakov","id":10994784,"avatar_url":"https://avatars.githubusercontent.com/u/10994784?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanZheleznyakov","html_url":"https://github.com/IvanZheleznyakov","followers_url":"https://api.github.com/users/IvanZheleznyakov/followers","following_url":"https://api.github.com/users/IvanZheleznyakov/following{/other_user}","gists_url":"https://api.github.com/users/IvanZheleznyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanZheleznyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanZheleznyakov/subscriptions","organizations_url":"https://api.github.com/users/IvanZheleznyakov/orgs","repos_url":"https://api.github.com/users/IvanZheleznyakov/repos","events_url":"https://api.github.com/users/IvanZheleznyakov/events{/privacy}","received_events_url":"https://api.github.com/users/IvanZheleznyakov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IvanZheleznyakov/SPBUworks","description":"My homeworks","fork":false,"url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks","forks_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/forks","keys_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/teams","hooks_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/hooks","issue_events_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues/events{/number}","events_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/events","assignees_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/assignees{/user}","branches_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/branches{/branch}","tags_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/tags","blobs_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/statuses/{sha}","languages_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/languages","stargazers_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/stargazers","contributors_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/contributors","subscribers_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/subscribers","subscription_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/subscription","commits_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/contents/{+path}","compare_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/merges","archive_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/downloads","issues_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues{/number}","pulls_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls{/number}","milestones_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/milestones{/number}","notifications_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/labels{/name}","releases_url":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/releases{/id}","created_at":"2015-03-23T15:30:10Z","updated_at":"2015-05-06T19:19:41Z","pushed_at":"2015-05-26T16:15:06Z","git_url":"git://github.com/IvanZheleznyakov/SPBUworks.git","ssh_url":"git@github.com:IvanZheleznyakov/SPBUworks.git","clone_url":"https://github.com/IvanZheleznyakov/SPBUworks.git","svn_url":"https://github.com/IvanZheleznyakov/SPBUworks","homepage":null,"size":532,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/5"},"html":{"href":"https://github.com/IvanZheleznyakov/SPBUworks/pull/5"},"issue":{"href":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues/5"},"comments":{"href":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/IvanZheleznyakov/SPBUworks/statuses/dae80cf4cca760ade313b2873f96a1b6826d920c"}}}}