{"action":"created","comment":{"url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/comments/183994622","pull_request_review_id":115098396,"id":183994622,"diff_hunk":"@@ -0,0 +1,68 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.IO;\n+using System.Linq;\n+using System.Reflection;\n+using System.Text;\n+using System.Threading.Tasks;\n+using FileStorage.BLL.Interfaces;\n+\n+namespace FileStorage.BLL.Services\n+{\n+    public class PluginManager\n+    {\n+        public static IPlugin[] GetPlugins()\n+        {\n+            var dllFileNames = GetDllNames(Directory.GetCurrentDirectory());\n+            var assemblies = GetAssemblies(dllFileNames);\n+            var types = GetIPluginTypes(assemblies);\n+            return GetIPlugins(types);\n+        }\n+\n+        private static string[] GetDllNames(string path)\n+        {\n+            return Directory.GetFiles(path, \"*.dll\");\n+        }\n+\n+        private static Assembly[] GetAssemblies(string[] dllFileNames)\n+        {\n+            var assemblies = new List<Assembly>();\n+            foreach (string dllFile in dllFileNames)\n+            {\n+                var assemblyName = AssemblyName.GetAssemblyName(dllFile);\n+                var assembly = Assembly.Load(assemblyName);\n+                assemblies.Add(assembly);\n+            }\n+            return assemblies.ToArray();\n+        }\n+\n+        private static Type[] GetIPluginTypes(Assembly[] assemblies)\n+        {\n+            var pluginType = typeof(IPlugin);\n+            var pluginTypes = new List<Type>();\n+            foreach (Assembly assembly in assemblies)\n+            {\n+                if (assembly == null) continue;\n+                Type[] types = assembly.GetTypes();\n+                foreach (Type type in types)\n+                {\n+                    if (type.IsInterface || type.IsAbstract) continue;\n+                    if (type.GetInterface(pluginType.FullName) != null)\n+                        pluginTypes.Add(type);\n+                }\n+            }               \n+            return pluginTypes.ToArray();\n+        }\n+\n+        private static IPlugin[] GetIPlugins(Type[] types)","path":"lab-file-storage/FileStorage/FileStorage/BLL/Services/PluginManager.cs","position":null,"original_position":57,"commit_id":"19428b0a27a8b3b68581aa7a91147b23628e263e","original_commit_id":"dca0ed7d0d2550dc35369b17ec710e00cac29f55","user":{"login":"Zhunusau","id":32765299,"avatar_url":"https://avatars2.githubusercontent.com/u/32765299?v=4","gravatar_id":"","url":"https://api.github.com/users/Zhunusau","html_url":"https://github.com/Zhunusau","followers_url":"https://api.github.com/users/Zhunusau/followers","following_url":"https://api.github.com/users/Zhunusau/following{/other_user}","gists_url":"https://api.github.com/users/Zhunusau/gists{/gist_id}","starred_url":"https://api.github.com/users/Zhunusau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zhunusau/subscriptions","organizations_url":"https://api.github.com/users/Zhunusau/orgs","repos_url":"https://api.github.com/users/Zhunusau/repos","events_url":"https://api.github.com/users/Zhunusau/events{/privacy}","received_events_url":"https://api.github.com/users/Zhunusau/received_events","type":"User","site_admin":false},"body":"rename method","created_at":"2018-04-25T09:28:45Z","updated_at":"2018-04-25T09:28:45Z","html_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau/pull/2#discussion_r183994622","pull_request_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/2","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/comments/183994622"},"html":{"href":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau/pull/2#discussion_r183994622"},"pull_request":{"href":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/2"}},"in_reply_to_id":183554939},"pull_request":{"url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/2","id":183007381,"html_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau/pull/2","diff_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau/pull/2.diff","patch_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau/pull/2.patch","issue_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues/2","number":2,"state":"open","locked":false,"title":"Lab 02. File Storage console application","user":{"login":"Zhunusau","id":32765299,"avatar_url":"https://avatars2.githubusercontent.com/u/32765299?v=4","gravatar_id":"","url":"https://api.github.com/users/Zhunusau","html_url":"https://github.com/Zhunusau","followers_url":"https://api.github.com/users/Zhunusau/followers","following_url":"https://api.github.com/users/Zhunusau/following{/other_user}","gists_url":"https://api.github.com/users/Zhunusau/gists{/gist_id}","starred_url":"https://api.github.com/users/Zhunusau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zhunusau/subscriptions","organizations_url":"https://api.github.com/users/Zhunusau/orgs","repos_url":"https://api.github.com/users/Zhunusau/repos","events_url":"https://api.github.com/users/Zhunusau/events{/privacy}","received_events_url":"https://api.github.com/users/Zhunusau/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-20T09:29:36Z","updated_at":"2018-04-25T09:28:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9fde60a46b250df9beaa29191f901c0e2755d1b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/2/commits","review_comments_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/2/comments","review_comment_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues/2/comments","statuses_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/statuses/19428b0a27a8b3b68581aa7a91147b23628e263e","head":{"label":"Godel-Mastery-v3:lab-02","ref":"lab-02","sha":"19428b0a27a8b3b68581aa7a91147b23628e263e","user":{"login":"Godel-Mastery-v3","id":37075055,"avatar_url":"https://avatars1.githubusercontent.com/u/37075055?v=4","gravatar_id":"","url":"https://api.github.com/users/Godel-Mastery-v3","html_url":"https://github.com/Godel-Mastery-v3","followers_url":"https://api.github.com/users/Godel-Mastery-v3/followers","following_url":"https://api.github.com/users/Godel-Mastery-v3/following{/other_user}","gists_url":"https://api.github.com/users/Godel-Mastery-v3/gists{/gist_id}","starred_url":"https://api.github.com/users/Godel-Mastery-v3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Godel-Mastery-v3/subscriptions","organizations_url":"https://api.github.com/users/Godel-Mastery-v3/orgs","repos_url":"https://api.github.com/users/Godel-Mastery-v3/repos","events_url":"https://api.github.com/users/Godel-Mastery-v3/events{/privacy}","received_events_url":"https://api.github.com/users/Godel-Mastery-v3/received_events","type":"Organization","site_admin":false},"repo":{"id":128057924,"name":"Ruslan-Zhunusau","full_name":"Godel-Mastery-v3/Ruslan-Zhunusau","owner":{"login":"Godel-Mastery-v3","id":37075055,"avatar_url":"https://avatars1.githubusercontent.com/u/37075055?v=4","gravatar_id":"","url":"https://api.github.com/users/Godel-Mastery-v3","html_url":"https://github.com/Godel-Mastery-v3","followers_url":"https://api.github.com/users/Godel-Mastery-v3/followers","following_url":"https://api.github.com/users/Godel-Mastery-v3/following{/other_user}","gists_url":"https://api.github.com/users/Godel-Mastery-v3/gists{/gist_id}","starred_url":"https://api.github.com/users/Godel-Mastery-v3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Godel-Mastery-v3/subscriptions","organizations_url":"https://api.github.com/users/Godel-Mastery-v3/orgs","repos_url":"https://api.github.com/users/Godel-Mastery-v3/repos","events_url":"https://api.github.com/users/Godel-Mastery-v3/events{/privacy}","received_events_url":"https://api.github.com/users/Godel-Mastery-v3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau","description":"Ruslan Zhunusau","fork":false,"url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau","forks_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/forks","keys_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/teams","hooks_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/hooks","issue_events_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues/events{/number}","events_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/events","assignees_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/assignees{/user}","branches_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/branches{/branch}","tags_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/tags","blobs_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/refs{/sha}","trees_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/statuses/{sha}","languages_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/languages","stargazers_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/stargazers","contributors_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/contributors","subscribers_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/subscribers","subscription_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/subscription","commits_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/commits{/sha}","git_commits_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/commits{/sha}","comments_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/comments{/number}","issue_comment_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues/comments{/number}","contents_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/contents/{+path}","compare_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/merges","archive_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/downloads","issues_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues{/number}","pulls_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls{/number}","milestones_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/milestones{/number}","notifications_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/labels{/name}","releases_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/releases{/id}","deployments_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/deployments","created_at":"2018-04-04T12:19:06Z","updated_at":"2018-04-11T07:36:48Z","pushed_at":"2018-04-25T09:25:32Z","git_url":"git://github.com/Godel-Mastery-v3/Ruslan-Zhunusau.git","ssh_url":"git@github.com:Godel-Mastery-v3/Ruslan-Zhunusau.git","clone_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau.git","svn_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Godel-Mastery-v3:master","ref":"master","sha":"4d413c454eff44036395ad39422f0f6f07e00ca3","user":{"login":"Godel-Mastery-v3","id":37075055,"avatar_url":"https://avatars1.githubusercontent.com/u/37075055?v=4","gravatar_id":"","url":"https://api.github.com/users/Godel-Mastery-v3","html_url":"https://github.com/Godel-Mastery-v3","followers_url":"https://api.github.com/users/Godel-Mastery-v3/followers","following_url":"https://api.github.com/users/Godel-Mastery-v3/following{/other_user}","gists_url":"https://api.github.com/users/Godel-Mastery-v3/gists{/gist_id}","starred_url":"https://api.github.com/users/Godel-Mastery-v3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Godel-Mastery-v3/subscriptions","organizations_url":"https://api.github.com/users/Godel-Mastery-v3/orgs","repos_url":"https://api.github.com/users/Godel-Mastery-v3/repos","events_url":"https://api.github.com/users/Godel-Mastery-v3/events{/privacy}","received_events_url":"https://api.github.com/users/Godel-Mastery-v3/received_events","type":"Organization","site_admin":false},"repo":{"id":128057924,"name":"Ruslan-Zhunusau","full_name":"Godel-Mastery-v3/Ruslan-Zhunusau","owner":{"login":"Godel-Mastery-v3","id":37075055,"avatar_url":"https://avatars1.githubusercontent.com/u/37075055?v=4","gravatar_id":"","url":"https://api.github.com/users/Godel-Mastery-v3","html_url":"https://github.com/Godel-Mastery-v3","followers_url":"https://api.github.com/users/Godel-Mastery-v3/followers","following_url":"https://api.github.com/users/Godel-Mastery-v3/following{/other_user}","gists_url":"https://api.github.com/users/Godel-Mastery-v3/gists{/gist_id}","starred_url":"https://api.github.com/users/Godel-Mastery-v3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Godel-Mastery-v3/subscriptions","organizations_url":"https://api.github.com/users/Godel-Mastery-v3/orgs","repos_url":"https://api.github.com/users/Godel-Mastery-v3/repos","events_url":"https://api.github.com/users/Godel-Mastery-v3/events{/privacy}","received_events_url":"https://api.github.com/users/Godel-Mastery-v3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau","description":"Ruslan Zhunusau","fork":false,"url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau","forks_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/forks","keys_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/teams","hooks_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/hooks","issue_events_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues/events{/number}","events_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/events","assignees_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/assignees{/user}","branches_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/branches{/branch}","tags_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/tags","blobs_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/refs{/sha}","trees_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/statuses/{sha}","languages_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/languages","stargazers_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/stargazers","contributors_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/contributors","subscribers_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/subscribers","subscription_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/subscription","commits_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/commits{/sha}","git_commits_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/git/commits{/sha}","comments_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/comments{/number}","issue_comment_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues/comments{/number}","contents_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/contents/{+path}","compare_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/merges","archive_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/downloads","issues_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues{/number}","pulls_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls{/number}","milestones_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/milestones{/number}","notifications_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/labels{/name}","releases_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/releases{/id}","deployments_url":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/deployments","created_at":"2018-04-04T12:19:06Z","updated_at":"2018-04-11T07:36:48Z","pushed_at":"2018-04-25T09:25:32Z","git_url":"git://github.com/Godel-Mastery-v3/Ruslan-Zhunusau.git","ssh_url":"git@github.com:Godel-Mastery-v3/Ruslan-Zhunusau.git","clone_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau.git","svn_url":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/2"},"html":{"href":"https://github.com/Godel-Mastery-v3/Ruslan-Zhunusau/pull/2"},"issue":{"href":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues/2"},"comments":{"href":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/Godel-Mastery-v3/Ruslan-Zhunusau/statuses/19428b0a27a8b3b68581aa7a91147b23628e263e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Zhunusau"}}