{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Configuration/pulls/comments/26990784","id":26990784,"diff_hunk":"@@ -0,0 +1,212 @@\n+﻿// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+using System;\n+using System.IO;\n+using Microsoft.Framework.ConfigurationModel.UserSecrets;\n+using Microsoft.Framework.Logging;\n+using Microsoft.Framework.Runtime.Common.CommandLine;\n+using Newtonsoft.Json.Linq;\n+\n+namespace SecretManager\n+{\n+    public class Program\n+    {\n+        private ILogger _logger;\n+        private CommandOutputProvider _loggerProvider;\n+\n+        public Program()\n+        {\n+            var loggerFactory = new LoggerFactory();\n+            CommandOutputProvider = new CommandOutputProvider();\n+            loggerFactory.AddProvider(CommandOutputProvider);\n+            Logger = loggerFactory.CreateLogger<Program>();\n+        }\n+\n+        public ILogger Logger\n+        {\n+            get { return _logger; }\n+            set\n+            {\n+                if (value == null)\n+                {\n+                    throw new ArgumentNullException(\"value\");\n+                }\n+\n+                _logger = value;\n+            }\n+        }\n+\n+        public CommandOutputProvider CommandOutputProvider\n+        {\n+            get { return _loggerProvider; }\n+            set\n+            {\n+                if (value == null)\n+                {\n+                    throw new ArgumentNullException(\"value\");\n+                }\n+\n+                _loggerProvider = value;\n+            }\n+        }\n+\n+        public int Main(string[] args)\n+        {\n+            try\n+            {\n+                var app = new CommandLineApplication();\n+                app.Description = \"Manages user secrets\";\n+\n+                app.HelpOption(\"-?|-h|--help\");\n+                var optVerbose = app.Option(\"-v|--verbose\", \"Verbose output\", CommandOptionType.NoValue);\n+\n+                app.Command(\"set\", c =>\n+                {\n+                    var optionProject = c.Option(\"-p|--project <PATH>\", \"Path to the project\", CommandOptionType.SingleValue);","path":"src/SecretManager/Program.cs","position":66,"original_position":66,"commit_id":"311bbc25736b4f4ad67c0ff54b912225d457afc3","original_commit_id":"f4163f825027d584aa0d589d6c0fceb56b3a956b","user":{"login":"ChengTian","id":1383883,"avatar_url":"https://avatars.githubusercontent.com/u/1383883?v=3","gravatar_id":"","url":"https://api.github.com/users/ChengTian","html_url":"https://github.com/ChengTian","followers_url":"https://api.github.com/users/ChengTian/followers","following_url":"https://api.github.com/users/ChengTian/following{/other_user}","gists_url":"https://api.github.com/users/ChengTian/gists{/gist_id}","starred_url":"https://api.github.com/users/ChengTian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChengTian/subscriptions","organizations_url":"https://api.github.com/users/ChengTian/orgs","repos_url":"https://api.github.com/users/ChengTian/repos","events_url":"https://api.github.com/users/ChengTian/events{/privacy}","received_events_url":"https://api.github.com/users/ChengTian/received_events","type":"User","site_admin":false},"body":"use `c.Description = \"...\"` to add description for each command","created_at":"2015-03-23T23:19:49Z","updated_at":"2015-03-23T23:19:49Z","html_url":"https://github.com/aspnet/Configuration/pull/162#discussion_r26990784","pull_request_url":"https://api.github.com/repos/aspnet/Configuration/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/comments/26990784"},"html":{"href":"https://github.com/aspnet/Configuration/pull/162#discussion_r26990784"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Configuration/pulls/162","id":31778008,"html_url":"https://github.com/aspnet/Configuration/pull/162","diff_url":"https://github.com/aspnet/Configuration/pull/162.diff","patch_url":"https://github.com/aspnet/Configuration/pull/162.patch","issue_url":"https://api.github.com/repos/aspnet/Configuration/issues/162","number":162,"state":"open","locked":false,"title":"User secrets feature","user":{"login":"Praburaj","id":2294732,"avatar_url":"https://avatars.githubusercontent.com/u/2294732?v=3","gravatar_id":"","url":"https://api.github.com/users/Praburaj","html_url":"https://github.com/Praburaj","followers_url":"https://api.github.com/users/Praburaj/followers","following_url":"https://api.github.com/users/Praburaj/following{/other_user}","gists_url":"https://api.github.com/users/Praburaj/gists{/gist_id}","starred_url":"https://api.github.com/users/Praburaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Praburaj/subscriptions","organizations_url":"https://api.github.com/users/Praburaj/orgs","repos_url":"https://api.github.com/users/Praburaj/repos","events_url":"https://api.github.com/users/Praburaj/events{/privacy}","received_events_url":"https://api.github.com/users/Praburaj/received_events","type":"User","site_admin":false},"body":"@loudej @DamianEdwards @muratg ","created_at":"2015-03-23T21:53:59Z","updated_at":"2015-03-23T23:19:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f61ff492962b31ee5d4ab4ed1830fbba2531cf1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Configuration/pulls/162/commits","review_comments_url":"https://api.github.com/repos/aspnet/Configuration/pulls/162/comments","review_comment_url":"https://api.github.com/repos/aspnet/Configuration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Configuration/issues/162/comments","statuses_url":"https://api.github.com/repos/aspnet/Configuration/statuses/311bbc25736b4f4ad67c0ff54b912225d457afc3","head":{"label":"Praburaj:dev","ref":"dev","sha":"311bbc25736b4f4ad67c0ff54b912225d457afc3","user":{"login":"Praburaj","id":2294732,"avatar_url":"https://avatars.githubusercontent.com/u/2294732?v=3","gravatar_id":"","url":"https://api.github.com/users/Praburaj","html_url":"https://github.com/Praburaj","followers_url":"https://api.github.com/users/Praburaj/followers","following_url":"https://api.github.com/users/Praburaj/following{/other_user}","gists_url":"https://api.github.com/users/Praburaj/gists{/gist_id}","starred_url":"https://api.github.com/users/Praburaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Praburaj/subscriptions","organizations_url":"https://api.github.com/users/Praburaj/orgs","repos_url":"https://api.github.com/users/Praburaj/repos","events_url":"https://api.github.com/users/Praburaj/events{/privacy}","received_events_url":"https://api.github.com/users/Praburaj/received_events","type":"User","site_admin":false},"repo":{"id":29270820,"name":"Configuration","full_name":"Praburaj/Configuration","owner":{"login":"Praburaj","id":2294732,"avatar_url":"https://avatars.githubusercontent.com/u/2294732?v=3","gravatar_id":"","url":"https://api.github.com/users/Praburaj","html_url":"https://github.com/Praburaj","followers_url":"https://api.github.com/users/Praburaj/followers","following_url":"https://api.github.com/users/Praburaj/following{/other_user}","gists_url":"https://api.github.com/users/Praburaj/gists{/gist_id}","starred_url":"https://api.github.com/users/Praburaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Praburaj/subscriptions","organizations_url":"https://api.github.com/users/Praburaj/orgs","repos_url":"https://api.github.com/users/Praburaj/repos","events_url":"https://api.github.com/users/Praburaj/events{/privacy}","received_events_url":"https://api.github.com/users/Praburaj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Praburaj/Configuration","description":"Interfaces and providers for accessing simple config files.","fork":true,"url":"https://api.github.com/repos/Praburaj/Configuration","forks_url":"https://api.github.com/repos/Praburaj/Configuration/forks","keys_url":"https://api.github.com/repos/Praburaj/Configuration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Praburaj/Configuration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Praburaj/Configuration/teams","hooks_url":"https://api.github.com/repos/Praburaj/Configuration/hooks","issue_events_url":"https://api.github.com/repos/Praburaj/Configuration/issues/events{/number}","events_url":"https://api.github.com/repos/Praburaj/Configuration/events","assignees_url":"https://api.github.com/repos/Praburaj/Configuration/assignees{/user}","branches_url":"https://api.github.com/repos/Praburaj/Configuration/branches{/branch}","tags_url":"https://api.github.com/repos/Praburaj/Configuration/tags","blobs_url":"https://api.github.com/repos/Praburaj/Configuration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Praburaj/Configuration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Praburaj/Configuration/git/refs{/sha}","trees_url":"https://api.github.com/repos/Praburaj/Configuration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Praburaj/Configuration/statuses/{sha}","languages_url":"https://api.github.com/repos/Praburaj/Configuration/languages","stargazers_url":"https://api.github.com/repos/Praburaj/Configuration/stargazers","contributors_url":"https://api.github.com/repos/Praburaj/Configuration/contributors","subscribers_url":"https://api.github.com/repos/Praburaj/Configuration/subscribers","subscription_url":"https://api.github.com/repos/Praburaj/Configuration/subscription","commits_url":"https://api.github.com/repos/Praburaj/Configuration/commits{/sha}","git_commits_url":"https://api.github.com/repos/Praburaj/Configuration/git/commits{/sha}","comments_url":"https://api.github.com/repos/Praburaj/Configuration/comments{/number}","issue_comment_url":"https://api.github.com/repos/Praburaj/Configuration/issues/comments{/number}","contents_url":"https://api.github.com/repos/Praburaj/Configuration/contents/{+path}","compare_url":"https://api.github.com/repos/Praburaj/Configuration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Praburaj/Configuration/merges","archive_url":"https://api.github.com/repos/Praburaj/Configuration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Praburaj/Configuration/downloads","issues_url":"https://api.github.com/repos/Praburaj/Configuration/issues{/number}","pulls_url":"https://api.github.com/repos/Praburaj/Configuration/pulls{/number}","milestones_url":"https://api.github.com/repos/Praburaj/Configuration/milestones{/number}","notifications_url":"https://api.github.com/repos/Praburaj/Configuration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Praburaj/Configuration/labels{/name}","releases_url":"https://api.github.com/repos/Praburaj/Configuration/releases{/id}","created_at":"2015-01-14T23:18:44Z","updated_at":"2015-03-23T23:11:58Z","pushed_at":"2015-03-23T23:11:58Z","git_url":"git://github.com/Praburaj/Configuration.git","ssh_url":"git@github.com:Praburaj/Configuration.git","clone_url":"https://github.com/Praburaj/Configuration.git","svn_url":"https://github.com/Praburaj/Configuration","homepage":"","size":477,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"e39d2d2d7d3ffff1b26f89fcf48021a9b703ce74","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":16329342,"name":"Configuration","full_name":"aspnet/Configuration","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Configuration","description":"Interfaces and providers for accessing simple config files.","fork":false,"url":"https://api.github.com/repos/aspnet/Configuration","forks_url":"https://api.github.com/repos/aspnet/Configuration/forks","keys_url":"https://api.github.com/repos/aspnet/Configuration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Configuration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Configuration/teams","hooks_url":"https://api.github.com/repos/aspnet/Configuration/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Configuration/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Configuration/events","assignees_url":"https://api.github.com/repos/aspnet/Configuration/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Configuration/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Configuration/tags","blobs_url":"https://api.github.com/repos/aspnet/Configuration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Configuration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Configuration/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Configuration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Configuration/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Configuration/languages","stargazers_url":"https://api.github.com/repos/aspnet/Configuration/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Configuration/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Configuration/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Configuration/subscription","commits_url":"https://api.github.com/repos/aspnet/Configuration/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Configuration/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Configuration/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Configuration/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Configuration/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Configuration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Configuration/merges","archive_url":"https://api.github.com/repos/aspnet/Configuration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Configuration/downloads","issues_url":"https://api.github.com/repos/aspnet/Configuration/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Configuration/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Configuration/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Configuration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Configuration/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Configuration/releases{/id}","created_at":"2014-01-28T23:11:33Z","updated_at":"2015-03-22T11:49:44Z","pushed_at":"2015-03-23T23:11:59Z","git_url":"git://github.com/aspnet/Configuration.git","ssh_url":"git@github.com:aspnet/Configuration.git","clone_url":"https://github.com/aspnet/Configuration.git","svn_url":"https://github.com/aspnet/Configuration","homepage":"","size":2248,"stargazers_count":62,"watchers_count":62,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":21,"forks":31,"open_issues":21,"watchers":62,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/162"},"html":{"href":"https://github.com/aspnet/Configuration/pull/162"},"issue":{"href":"https://api.github.com/repos/aspnet/Configuration/issues/162"},"comments":{"href":"https://api.github.com/repos/aspnet/Configuration/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Configuration/statuses/311bbc25736b4f4ad67c0ff54b912225d457afc3"}}}}