{"action":"created","comment":{"url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/comments/35822328","id":35822328,"diff_hunk":"@@ -0,0 +1,175 @@\n+﻿/*\n+ * Copyright (c) 2014, salesforce.com, inc.\n+ * All rights reserved.\n+ * Redistribution and use of this software in source and binary forms, with or\n+ * without modification, are permitted provided that the following conditions\n+ * are met:\n+ * - Redistributions of source code must retain the above copyright notice, this\n+ * list of conditions and the following disclaimer.\n+ * - Redistributions in binary form must reproduce the above copyright notice,\n+ * this list of conditions and the following disclaimer in the documentation\n+ * and/or other materials provided with the distribution.\n+ * - Neither the name of salesforce.com, inc. nor the names of its contributors\n+ * may be used to endorse or promote products derived from this software without\n+ * specific prior written permission of salesforce.com, inc.\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n+ * POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+using Salesforce.SDK.Auth;\n+using Salesforce.SDK.Core;\n+using Salesforce.SDK.Logging;\n+using Salesforce.SDK.Security;\n+using Salesforce.SDK.Settings;\n+using System;\n+using System.IO;\n+using System.Linq;\n+using System.Threading.Tasks;\n+using System.Xml.Linq;\n+using Windows.ApplicationModel;\n+using Windows.Storage;\n+using Windows.Storage.Streams;\n+\n+namespace Salesforce.SDK.App\n+{\n+    public class ApplicationService : IApplicationInformationService\n+    {\n+        private static IEncryptionService EncryptionService => SDKServiceLocator.Get<IEncryptionService>();\n+        private static ILoggingService LoggingService => SDKServiceLocator.Get<ILoggingService>();\n+        private const string UserAgentHeaderFormat = \"SalesforceMobileSDK/3.1 ({0}/{1} {2}) {3}\";\n+\n+        /// <summary>\n+        ///     Settings key for config.\n+        /// </summary>\n+        private const string ConfigSettings = \"salesforceConfig\";\n+\n+        private const string DefaultServerPath = \"Salesforce.SDK.Resources.servers.xml\";\n+\n+        public Task ClearConfigurationSettingsAsync()\n+        {\n+            ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;\n+            return Task.FromResult<bool>(settings.Values.Remove(ConfigSettings));\n+        }\n+\n+        public async Task<bool> DoesFileExistAsync(string path)","path":"SalesforceSDK/Universal/App/ApplicationService.cs","position":63,"original_position":63,"commit_id":"e046062dcf4ab8a8cb361bbd717fa0bd8a3528bf","original_commit_id":"e046062dcf4ab8a8cb361bbd717fa0bd8a3528bf","user":{"login":"jhsfdc","id":12836066,"avatar_url":"https://avatars.githubusercontent.com/u/12836066?v=3","gravatar_id":"","url":"https://api.github.com/users/jhsfdc","html_url":"https://github.com/jhsfdc","followers_url":"https://api.github.com/users/jhsfdc/followers","following_url":"https://api.github.com/users/jhsfdc/following{/other_user}","gists_url":"https://api.github.com/users/jhsfdc/gists{/gist_id}","starred_url":"https://api.github.com/users/jhsfdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhsfdc/subscriptions","organizations_url":"https://api.github.com/users/jhsfdc/orgs","repos_url":"https://api.github.com/users/jhsfdc/repos","events_url":"https://api.github.com/users/jhsfdc/events{/privacy}","received_events_url":"https://api.github.com/users/jhsfdc/received_events","type":"User","site_admin":false},"body":"can we just use System.IO.File.Exists(path) function in the implementation here?","created_at":"2015-07-29T23:05:40Z","updated_at":"2015-07-29T23:05:40Z","html_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows/pull/9#discussion_r35822328","pull_request_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/comments/35822328"},"html":{"href":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows/pull/9#discussion_r35822328"},"pull_request":{"href":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/9","id":41182014,"html_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows/pull/9","diff_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows/pull/9.diff","patch_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows/pull/9.patch","issue_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues/9","number":9,"state":"open","locked":false,"title":"Fixing libraries","user":{"login":"smcnulty-sfdc","id":2816138,"avatar_url":"https://avatars.githubusercontent.com/u/2816138?v=3","gravatar_id":"","url":"https://api.github.com/users/smcnulty-sfdc","html_url":"https://github.com/smcnulty-sfdc","followers_url":"https://api.github.com/users/smcnulty-sfdc/followers","following_url":"https://api.github.com/users/smcnulty-sfdc/following{/other_user}","gists_url":"https://api.github.com/users/smcnulty-sfdc/gists{/gist_id}","starred_url":"https://api.github.com/users/smcnulty-sfdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcnulty-sfdc/subscriptions","organizations_url":"https://api.github.com/users/smcnulty-sfdc/orgs","repos_url":"https://api.github.com/users/smcnulty-sfdc/repos","events_url":"https://api.github.com/users/smcnulty-sfdc/events{/privacy}","received_events_url":"https://api.github.com/users/smcnulty-sfdc/received_events","type":"User","site_admin":false},"body":"Fixes:\r\n1. IApplicationInformationService was not implemented.\r\n2. Namespace was bad on several files. Fixed.\r\n3. Made Encryptor non-static, applied interface.\r\n4. Added logger to hybrid.\r\n5. Registered services for universal & hybrid.","created_at":"2015-07-29T22:59:18Z","updated_at":"2015-07-29T23:05:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54addbb1a001a860dc8cf2243aec92b8d7481a36","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/9/commits","review_comments_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/9/comments","review_comment_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues/9/comments","statuses_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/statuses/e046062dcf4ab8a8cb361bbd717fa0bd8a3528bf","head":{"label":"jhsfdc:smcnulty-unstable","ref":"smcnulty-unstable","sha":"e046062dcf4ab8a8cb361bbd717fa0bd8a3528bf","user":{"login":"jhsfdc","id":12836066,"avatar_url":"https://avatars.githubusercontent.com/u/12836066?v=3","gravatar_id":"","url":"https://api.github.com/users/jhsfdc","html_url":"https://github.com/jhsfdc","followers_url":"https://api.github.com/users/jhsfdc/followers","following_url":"https://api.github.com/users/jhsfdc/following{/other_user}","gists_url":"https://api.github.com/users/jhsfdc/gists{/gist_id}","starred_url":"https://api.github.com/users/jhsfdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhsfdc/subscriptions","organizations_url":"https://api.github.com/users/jhsfdc/orgs","repos_url":"https://api.github.com/users/jhsfdc/repos","events_url":"https://api.github.com/users/jhsfdc/events{/privacy}","received_events_url":"https://api.github.com/users/jhsfdc/received_events","type":"User","site_admin":false},"repo":{"id":39259341,"name":"SalesforceMobileSDK-Windows","full_name":"jhsfdc/SalesforceMobileSDK-Windows","owner":{"login":"jhsfdc","id":12836066,"avatar_url":"https://avatars.githubusercontent.com/u/12836066?v=3","gravatar_id":"","url":"https://api.github.com/users/jhsfdc","html_url":"https://github.com/jhsfdc","followers_url":"https://api.github.com/users/jhsfdc/followers","following_url":"https://api.github.com/users/jhsfdc/following{/other_user}","gists_url":"https://api.github.com/users/jhsfdc/gists{/gist_id}","starred_url":"https://api.github.com/users/jhsfdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhsfdc/subscriptions","organizations_url":"https://api.github.com/users/jhsfdc/orgs","repos_url":"https://api.github.com/users/jhsfdc/repos","events_url":"https://api.github.com/users/jhsfdc/events{/privacy}","received_events_url":"https://api.github.com/users/jhsfdc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows","description":"Windows SDK for Salesforce","fork":true,"url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows","forks_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/forks","keys_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/teams","hooks_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/hooks","issue_events_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues/events{/number}","events_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/events","assignees_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/assignees{/user}","branches_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/branches{/branch}","tags_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/tags","blobs_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/refs{/sha}","trees_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/statuses/{sha}","languages_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/languages","stargazers_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/stargazers","contributors_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/contributors","subscribers_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/subscribers","subscription_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/subscription","commits_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/commits{/sha}","git_commits_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/commits{/sha}","comments_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/comments{/number}","issue_comment_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues/comments{/number}","contents_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/contents/{+path}","compare_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/merges","archive_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/downloads","issues_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues{/number}","pulls_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls{/number}","milestones_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/milestones{/number}","notifications_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/labels{/name}","releases_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/releases{/id}","created_at":"2015-07-17T14:52:44Z","updated_at":"2015-07-17T14:52:45Z","pushed_at":"2015-07-29T23:01:49Z","git_url":"git://github.com/jhsfdc/SalesforceMobileSDK-Windows.git","ssh_url":"git@github.com:jhsfdc/SalesforceMobileSDK-Windows.git","clone_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows.git","svn_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows","homepage":null,"size":47477,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"jhsfdc:unstable-jhorst","ref":"unstable-jhorst","sha":"b16aef61d830fed6cbe94758b52d607dc1303d68","user":{"login":"jhsfdc","id":12836066,"avatar_url":"https://avatars.githubusercontent.com/u/12836066?v=3","gravatar_id":"","url":"https://api.github.com/users/jhsfdc","html_url":"https://github.com/jhsfdc","followers_url":"https://api.github.com/users/jhsfdc/followers","following_url":"https://api.github.com/users/jhsfdc/following{/other_user}","gists_url":"https://api.github.com/users/jhsfdc/gists{/gist_id}","starred_url":"https://api.github.com/users/jhsfdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhsfdc/subscriptions","organizations_url":"https://api.github.com/users/jhsfdc/orgs","repos_url":"https://api.github.com/users/jhsfdc/repos","events_url":"https://api.github.com/users/jhsfdc/events{/privacy}","received_events_url":"https://api.github.com/users/jhsfdc/received_events","type":"User","site_admin":false},"repo":{"id":39259341,"name":"SalesforceMobileSDK-Windows","full_name":"jhsfdc/SalesforceMobileSDK-Windows","owner":{"login":"jhsfdc","id":12836066,"avatar_url":"https://avatars.githubusercontent.com/u/12836066?v=3","gravatar_id":"","url":"https://api.github.com/users/jhsfdc","html_url":"https://github.com/jhsfdc","followers_url":"https://api.github.com/users/jhsfdc/followers","following_url":"https://api.github.com/users/jhsfdc/following{/other_user}","gists_url":"https://api.github.com/users/jhsfdc/gists{/gist_id}","starred_url":"https://api.github.com/users/jhsfdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhsfdc/subscriptions","organizations_url":"https://api.github.com/users/jhsfdc/orgs","repos_url":"https://api.github.com/users/jhsfdc/repos","events_url":"https://api.github.com/users/jhsfdc/events{/privacy}","received_events_url":"https://api.github.com/users/jhsfdc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows","description":"Windows SDK for Salesforce","fork":true,"url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows","forks_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/forks","keys_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/teams","hooks_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/hooks","issue_events_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues/events{/number}","events_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/events","assignees_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/assignees{/user}","branches_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/branches{/branch}","tags_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/tags","blobs_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/refs{/sha}","trees_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/statuses/{sha}","languages_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/languages","stargazers_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/stargazers","contributors_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/contributors","subscribers_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/subscribers","subscription_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/subscription","commits_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/commits{/sha}","git_commits_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/git/commits{/sha}","comments_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/comments{/number}","issue_comment_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues/comments{/number}","contents_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/contents/{+path}","compare_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/merges","archive_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/downloads","issues_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues{/number}","pulls_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls{/number}","milestones_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/milestones{/number}","notifications_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/labels{/name}","releases_url":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/releases{/id}","created_at":"2015-07-17T14:52:44Z","updated_at":"2015-07-17T14:52:45Z","pushed_at":"2015-07-29T23:01:49Z","git_url":"git://github.com/jhsfdc/SalesforceMobileSDK-Windows.git","ssh_url":"git@github.com:jhsfdc/SalesforceMobileSDK-Windows.git","clone_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows.git","svn_url":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows","homepage":null,"size":47477,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/9"},"html":{"href":"https://github.com/jhsfdc/SalesforceMobileSDK-Windows/pull/9"},"issue":{"href":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues/9"},"comments":{"href":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/jhsfdc/SalesforceMobileSDK-Windows/statuses/e046062dcf4ab8a8cb361bbd717fa0bd8a3528bf"}}}}