{"action":"created","comment":{"url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/comments/202728314","pull_request_review_id":137482173,"id":202728314,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjcyODMxNA==","diff_hunk":"@@ -0,0 +1,81 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.Diagnostics;\n+using System.IO;\n+using System.Linq;\n+using Microsoft.Extensions.Logging;\n+using Stratis.Bitcoin.Configuration;\n+using Stratis.Bitcoin.Features.Apps.Interfaces;\n+using Stratis.Bitcoin.Utilities;\n+using Stratis.Bitcoin.Utilities.Extensions;\n+\n+namespace Stratis.Bitcoin.Features.Apps\n+{\n+    /// <summary>\n+    /// Responsible for storing StratisApps as read from the current running Stratis folder.\n+    /// </summary>\n+    public class AppsStore : IAppsStore\n+    {\n+        private readonly ILogger logger;\n+        private List<IStratisApp> applications;\n+        private readonly DataFolder dataFolder;\n+        private const string ConfigFileName = \"stratisApp.json\";\n+\n+        public AppsStore(ILoggerFactory loggerFactory, DataFolder dataFolder)\n+        {\n+            this.dataFolder = dataFolder;\n+            this.logger = loggerFactory.CreateLogger(this.GetType().FullName);            \n+        }\n+\n+        public IEnumerable<IStratisApp> Applications\n+        {\n+            get\n+            {\n+                if (this.applications == null)\n+                    this.Load();\n+\n+                return this.applications;\n+            }\n+        }\n+\n+        private void Load()\n+        {\n+            try\n+            {\n+                Debug.Assert(this.applications==null);","path":"src/Stratis.Bitcoin.Features.Apps/AppsStore.cs","position":45,"original_position":45,"commit_id":"a5569965fa865e4c81d2708290a1ef56a279f490","original_commit_id":"a5569965fa865e4c81d2708290a1ef56a279f490","user":{"login":"bokobza","id":1867877,"node_id":"MDQ6VXNlcjE4Njc4Nzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1867877?v=4","gravatar_id":"","url":"https://api.github.com/users/bokobza","html_url":"https://github.com/bokobza","followers_url":"https://api.github.com/users/bokobza/followers","following_url":"https://api.github.com/users/bokobza/following{/other_user}","gists_url":"https://api.github.com/users/bokobza/gists{/gist_id}","starred_url":"https://api.github.com/users/bokobza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bokobza/subscriptions","organizations_url":"https://api.github.com/users/bokobza/orgs","repos_url":"https://api.github.com/users/bokobza/repos","events_url":"https://api.github.com/users/bokobza/events{/privacy}","received_events_url":"https://api.github.com/users/bokobza/received_events","type":"User","site_admin":false},"body":"Instead of throwing an exception here, can you return the applications instead?\r\n","created_at":"2018-07-16T15:34:34Z","updated_at":"2018-07-16T15:34:35Z","html_url":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/1651#discussion_r202728314","pull_request_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/1651","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/comments/202728314"},"html":{"href":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/1651#discussion_r202728314"},"pull_request":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/1651"}}},"pull_request":{"url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/1651","id":200661461,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNjYxNDYx","html_url":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/1651","diff_url":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/1651.diff","patch_url":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/1651.patch","issue_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/1651","number":1651,"state":"open","locked":false,"title":"Feature plugins","user":{"login":"herbepau","id":6311304,"node_id":"MDQ6VXNlcjYzMTEzMDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6311304?v=4","gravatar_id":"","url":"https://api.github.com/users/herbepau","html_url":"https://github.com/herbepau","followers_url":"https://api.github.com/users/herbepau/followers","following_url":"https://api.github.com/users/herbepau/following{/other_user}","gists_url":"https://api.github.com/users/herbepau/gists{/gist_id}","starred_url":"https://api.github.com/users/herbepau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/herbepau/subscriptions","organizations_url":"https://api.github.com/users/herbepau/orgs","repos_url":"https://api.github.com/users/herbepau/repos","events_url":"https://api.github.com/users/herbepau/events{/privacy}","received_events_url":"https://api.github.com/users/herbepau/received_events","type":"User","site_admin":false},"body":"@dangershony @bokobza \r\n\r\nJeremy / Dan - please look at this AppsFeature PR.\r\n\r\n* AppsFeature - the new feature\r\n* AppsFileService - responsible for any file I/O e.g. reading from the Stratis apps folder\r\n* AppsHost - responsible for hosting and hosting lifetime of the single page app\r\n* AppsStore - responsible for storing the apps as read from config (injected into AppsController)\r\n* StratisApp - represents an app as defined in app config\r\n* AppsController - ASP controller injected with IAppStore\r\n\r\n- Tests are at Stratis.Bitcoin.Features.Apps.Tests\r\n- Stratis.Bitcoin.Apps.Browser - trial Blazor app that communicates with the apps feature via the AppsController\r\n\r\nAs discussed with Jeremy, have moved the FindPorts method from a test file to new IpHelper class.  This is now used by the aforementioned test and the new apps feature.\r\n\r\nThanks\r\n-Paul","created_at":"2018-07-11T10:56:40Z","updated_at":"2018-07-16T15:34:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afa4a72ea7996ddea48f0949c61364be20965dd3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":926800696,"node_id":"MDU6TGFiZWw5MjY4MDA2OTY=","url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/labels/pr-review-high","name":"pr-review-high","color":"0D2B50","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/1651/commits","review_comments_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/1651/comments","review_comment_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/1651/comments","statuses_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/statuses/a5569965fa865e4c81d2708290a1ef56a279f490","head":{"label":"herbepau:feature-plugins","ref":"feature-plugins","sha":"a5569965fa865e4c81d2708290a1ef56a279f490","user":{"login":"herbepau","id":6311304,"node_id":"MDQ6VXNlcjYzMTEzMDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6311304?v=4","gravatar_id":"","url":"https://api.github.com/users/herbepau","html_url":"https://github.com/herbepau","followers_url":"https://api.github.com/users/herbepau/followers","following_url":"https://api.github.com/users/herbepau/following{/other_user}","gists_url":"https://api.github.com/users/herbepau/gists{/gist_id}","starred_url":"https://api.github.com/users/herbepau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/herbepau/subscriptions","organizations_url":"https://api.github.com/users/herbepau/orgs","repos_url":"https://api.github.com/users/herbepau/repos","events_url":"https://api.github.com/users/herbepau/events{/privacy}","received_events_url":"https://api.github.com/users/herbepau/received_events","type":"User","site_admin":false},"repo":{"id":138308099,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgzMDgwOTk=","name":"StratisBitcoinFullNode","full_name":"herbepau/StratisBitcoinFullNode","owner":{"login":"herbepau","id":6311304,"node_id":"MDQ6VXNlcjYzMTEzMDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6311304?v=4","gravatar_id":"","url":"https://api.github.com/users/herbepau","html_url":"https://github.com/herbepau","followers_url":"https://api.github.com/users/herbepau/followers","following_url":"https://api.github.com/users/herbepau/following{/other_user}","gists_url":"https://api.github.com/users/herbepau/gists{/gist_id}","starred_url":"https://api.github.com/users/herbepau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/herbepau/subscriptions","organizations_url":"https://api.github.com/users/herbepau/orgs","repos_url":"https://api.github.com/users/herbepau/repos","events_url":"https://api.github.com/users/herbepau/events{/privacy}","received_events_url":"https://api.github.com/users/herbepau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/herbepau/StratisBitcoinFullNode","description":"Bitcoin full node in C#","fork":true,"url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode","forks_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/forks","keys_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/teams","hooks_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/hooks","issue_events_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/issues/events{/number}","events_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/events","assignees_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/assignees{/user}","branches_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/branches{/branch}","tags_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/tags","blobs_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/git/refs{/sha}","trees_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/statuses/{sha}","languages_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/languages","stargazers_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/stargazers","contributors_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/contributors","subscribers_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/subscribers","subscription_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/subscription","commits_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/commits{/sha}","git_commits_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/git/commits{/sha}","comments_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/comments{/number}","issue_comment_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/issues/comments{/number}","contents_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/contents/{+path}","compare_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/merges","archive_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/downloads","issues_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/issues{/number}","pulls_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/pulls{/number}","milestones_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/milestones{/number}","notifications_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/labels{/name}","releases_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/releases{/id}","deployments_url":"https://api.github.com/repos/herbepau/StratisBitcoinFullNode/deployments","created_at":"2018-06-22T13:48:45Z","updated_at":"2018-07-12T15:30:08Z","pushed_at":"2018-07-16T14:31:52Z","git_url":"git://github.com/herbepau/StratisBitcoinFullNode.git","ssh_url":"git@github.com:herbepau/StratisBitcoinFullNode.git","clone_url":"https://github.com/herbepau/StratisBitcoinFullNode.git","svn_url":"https://github.com/herbepau/StratisBitcoinFullNode","homepage":"https://stratisplatform.com","size":31470,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"stratisproject:master","ref":"master","sha":"831a43232f3e7f2e19a408986c8004ca46c31c5f","user":{"login":"stratisproject","id":15229748,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjI5NzQ4","avatar_url":"https://avatars0.githubusercontent.com/u/15229748?v=4","gravatar_id":"","url":"https://api.github.com/users/stratisproject","html_url":"https://github.com/stratisproject","followers_url":"https://api.github.com/users/stratisproject/followers","following_url":"https://api.github.com/users/stratisproject/following{/other_user}","gists_url":"https://api.github.com/users/stratisproject/gists{/gist_id}","starred_url":"https://api.github.com/users/stratisproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratisproject/subscriptions","organizations_url":"https://api.github.com/users/stratisproject/orgs","repos_url":"https://api.github.com/users/stratisproject/repos","events_url":"https://api.github.com/users/stratisproject/events{/privacy}","received_events_url":"https://api.github.com/users/stratisproject/received_events","type":"Organization","site_admin":false},"repo":{"id":67271290,"node_id":"MDEwOlJlcG9zaXRvcnk2NzI3MTI5MA==","name":"StratisBitcoinFullNode","full_name":"stratisproject/StratisBitcoinFullNode","owner":{"login":"stratisproject","id":15229748,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjI5NzQ4","avatar_url":"https://avatars0.githubusercontent.com/u/15229748?v=4","gravatar_id":"","url":"https://api.github.com/users/stratisproject","html_url":"https://github.com/stratisproject","followers_url":"https://api.github.com/users/stratisproject/followers","following_url":"https://api.github.com/users/stratisproject/following{/other_user}","gists_url":"https://api.github.com/users/stratisproject/gists{/gist_id}","starred_url":"https://api.github.com/users/stratisproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratisproject/subscriptions","organizations_url":"https://api.github.com/users/stratisproject/orgs","repos_url":"https://api.github.com/users/stratisproject/repos","events_url":"https://api.github.com/users/stratisproject/events{/privacy}","received_events_url":"https://api.github.com/users/stratisproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stratisproject/StratisBitcoinFullNode","description":"Bitcoin full node in C#","fork":false,"url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode","forks_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/forks","keys_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/teams","hooks_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/hooks","issue_events_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/events{/number}","events_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/events","assignees_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/assignees{/user}","branches_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/branches{/branch}","tags_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/tags","blobs_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/refs{/sha}","trees_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/statuses/{sha}","languages_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/languages","stargazers_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/stargazers","contributors_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/contributors","subscribers_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/subscribers","subscription_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/subscription","commits_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/commits{/sha}","git_commits_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/commits{/sha}","comments_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/comments{/number}","issue_comment_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/comments{/number}","contents_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/contents/{+path}","compare_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/merges","archive_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/downloads","issues_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues{/number}","pulls_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls{/number}","milestones_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/milestones{/number}","notifications_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/labels{/name}","releases_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/releases{/id}","deployments_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/deployments","created_at":"2016-09-03T04:32:51Z","updated_at":"2018-07-16T15:16:51Z","pushed_at":"2018-07-16T15:23:34Z","git_url":"git://github.com/stratisproject/StratisBitcoinFullNode.git","ssh_url":"git@github.com:stratisproject/StratisBitcoinFullNode.git","clone_url":"https://github.com/stratisproject/StratisBitcoinFullNode.git","svn_url":"https://github.com/stratisproject/StratisBitcoinFullNode","homepage":"https://stratisplatform.com","size":31416,"stargazers_count":511,"watchers_count":511,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":229,"mirror_url":null,"archived":false,"open_issues_count":109,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":229,"open_issues":109,"watchers":511,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/1651"},"html":{"href":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/1651"},"issue":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/1651"},"comments":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/1651/comments"},"review_comments":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/1651/comments"},"review_comment":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/1651/commits"},"statuses":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/statuses/a5569965fa865e4c81d2708290a1ef56a279f490"}},"author_association":"NONE"}}
{"actor":{"display_login":"bokobza"}}