{"action":"created","comment":{"url":"https://api.github.com/repos/CatalystCode/react-native/pulls/comments/55830257","id":55830257,"diff_hunk":"@@ -20,5 +45,281 @@ public override string Name\n                 return \"AsyncLocalStorage\";\n             }\n         }\n+\n+        /// <summary>\n+        /// Given an array of keys, this returns a map of (key, value) pairs for the keys found, and\n+        /// (key, null) for the keys that haven't been found.\n+        /// </summary>\n+        /// <param name=\"keys\">Array of key values</param>\n+        /// <param name=\"callback\">Callback.</param>\n+        [ReactMethod]\n+        public void multiGet(string[] keys, ICallback callback)\n+        {\n+            Debug.Assert(keys != null);\n+            Debug.Assert(callback != null);\n+\n+            var result = new JArray();\n+            foreach (var key in keys)\n+            {\n+                result.Add(new JArray\n+                {\n+                    key,\n+                    getTokenFromContainer(key),\n+                });\n+            }\n+            callback.Invoke(result);\n+        }\n+\n+        /// <summary>\n+        /// Inserts multiple (key, value) pairs. The insertion will replace conflicting (key, value) pairs.\n+        /// </summary>\n+        /// <param name=\"keyValueArray\">Array of key values</param>\n+        /// <param name=\"callback\">Callback.</param>\n+        [ReactMethod]\n+        public void multiSet(JArray keyValueArray, ICallback callback)\n+        {\n+            Debug.Assert(keyValueArray != null);\n+            Debug.Assert(callback != null);\n+\n+            var result = new JArray();\n+            foreach (var keyValue in keyValueArray)\n+            {\n+                if (keyValue.Type == JTokenType.Array && keyValue.Value<JArray>().Count == 2)\n+                {\n+                    var pair = keyValue.Value<JArray>();\n+                    if (pair.First.Type == JTokenType.String)\n+                    {\n+                        addTokenToContainer(pair.First.Value<string>(), pair.Last);\n+                    }\n+                    else\n+                    {\n+                        result.Add(new JArray\n+                        {\n+                            _invalidKey,\n+                            pair.First,\n+                        });\n+                    }\n+                }\n+                else\n+                {\n+                    result.Add(new JArray\n+                    {\n+                        _invalidPair,\n+                        keyValue,\n+                    });\n+                }\n+            }\n+            callback.Invoke(result);\n+        }\n+\n+        /// <summary>\n+        /// Removes all rows of the keys given.\n+        /// </summary>\n+        /// <param name=\"keys\">Array of key values</param>\n+        /// <param name=\"callback\">Callback.</param>\n+        [ReactMethod]\n+        public void multiRemove(string[] keys, ICallback callback)\n+        {\n+            Debug.Assert(keys != null);\n+            Debug.Assert(callback != null);\n+\n+            var result = new JArray();\n+            foreach (var key in keys)\n+            {\n+                _dataContainer.Values.Remove(key);\n+                _typeContainer.Values.Remove(key);\n+            }\n+            callback.Invoke(result);\n+        }\n+\n+        /// <summary>\n+        /// Given an array of (key, value) pairs, this will merge the given values with the stored values\n+        /// of the given keys, if they exist.\n+        /// </summary>\n+        /// <param name=\"keyValueArray\">Array of key values</param>\n+        /// <param name=\"callback\">Callback.</param>\n+        [ReactMethod]\n+        public void multiMerge(JArray keyValueArray, ICallback callback)\n+        {\n+            Debug.Assert(keyValueArray != null);\n+            Debug.Assert(callback != null);\n+\n+            var result = new JArray();\n+            foreach (var keyValue in keyValueArray)\n+            {\n+                if (keyValue.Type == JTokenType.Array && keyValue.Value<JArray>().Count == 2)\n+                {\n+                    var pair = keyValue.Value<JArray>();\n+                    if (pair.First.Type == JTokenType.String)\n+                    {\n+                        var key = pair.First.Value<string>();\n+                        var tokenOld = getTokenFromContainer(key);\n+                        var tokenNew = pair.Last;\n+\n+                        if (tokenOld.Type != JTokenType.Null)\n+                        {\n+                            if (tokenOld.Type == JTokenType.Array)\n+                            {\n+                                ((JArray)tokenOld).Merge(tokenNew);\n+                                tokenNew = tokenOld;\n+                            }\n+                            else if (tokenNew.Type == JTokenType.Array)\n+                            {\n+                                ((JArray)tokenNew).Merge(tokenOld);\n+                            }\n+                            else if (tokenNew.Type == JTokenType.Null)\n+                            {\n+                                tokenNew = tokenOld;\n+                            }\n+                        }\n+                        addTokenToContainer(key, tokenNew);\n+                    }\n+                    else\n+                    {\n+                        result.Add(new JArray\n+                        {\n+                            _invalidKey,\n+                            pair.First,\n+                        });\n+                    }\n+                }\n+                else\n+                {\n+                    result.Add(new JArray\n+                    {\n+                        _invalidPair,\n+                        keyValue,\n+                    });\n+                }\n+            }\n+            callback.Invoke(result);\n+        }\n+\n+        /// <summary>\n+        /// Clears the database.\n+        /// </summary>\n+        /// <param name=\"callback\">Callback.</param>\n+        [ReactMethod]\n+        public void clear(ICallback callback)\n+        {\n+            Debug.Assert(callback != null);\n+\n+            _dataContainer.Values.Clear();\n+            _typeContainer.Values.Clear();\n+\n+            callback.Invoke();\n+        }\n+\n+        /// <summary>\n+        /// Returns an array with all keys from the database.\n+        /// </summary>\n+        /// <param name=\"callback\">Callback.</param>\n+        [ReactMethod]\n+        public void getAllKeys(ICallback callback)\n+        {\n+            Debug.Assert(callback != null);\n+\n+            callback.Invoke(JToken.FromObject(_dataContainer.Values.Keys)); \n+        }\n+\n+        /// <summary>\n+        /// Adds JToken to ApplicationDataContainer with the specified key.","path":"ReactWindows/ReactNative/Modules/Storage/AsyncStorageModule.cs","position":227,"original_position":227,"commit_id":"0cd789ab3ed7463b976c5c074c80eb0bf6b94fec","original_commit_id":"0cd789ab3ed7463b976c5c074c80eb0bf6b94fec","user":{"login":"rozele","id":1106239,"avatar_url":"https://avatars.githubusercontent.com/u/1106239?v=3","gravatar_id":"","url":"https://api.github.com/users/rozele","html_url":"https://github.com/rozele","followers_url":"https://api.github.com/users/rozele/followers","following_url":"https://api.github.com/users/rozele/following{/other_user}","gists_url":"https://api.github.com/users/rozele/gists{/gist_id}","starred_url":"https://api.github.com/users/rozele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozele/subscriptions","organizations_url":"https://api.github.com/users/rozele/orgs","repos_url":"https://api.github.com/users/rozele/repos","events_url":"https://api.github.com/users/rozele/events{/privacy}","received_events_url":"https://api.github.com/users/rozele/received_events","type":"User","site_admin":false},"body":"We've been using <see cref=\"ApplicationDataContainer\"> when referencing classes in comments.","created_at":"2016-03-11T13:47:37Z","updated_at":"2016-03-11T13:47:37Z","html_url":"https://github.com/CatalystCode/react-native/pull/247#discussion_r55830257","pull_request_url":"https://api.github.com/repos/CatalystCode/react-native/pulls/247","_links":{"self":{"href":"https://api.github.com/repos/CatalystCode/react-native/pulls/comments/55830257"},"html":{"href":"https://github.com/CatalystCode/react-native/pull/247#discussion_r55830257"},"pull_request":{"href":"https://api.github.com/repos/CatalystCode/react-native/pulls/247"}}},"pull_request":{"url":"https://api.github.com/repos/CatalystCode/react-native/pulls/247","id":62438108,"html_url":"https://github.com/CatalystCode/react-native/pull/247","diff_url":"https://github.com/CatalystCode/react-native/pull/247.diff","patch_url":"https://github.com/CatalystCode/react-native/pull/247.patch","issue_url":"https://api.github.com/repos/CatalystCode/react-native/issues/247","number":247,"state":"open","locked":false,"title":"feat(AsyncStorageModule): add AsyncStorageModule","user":{"login":"ebragge","id":7395421,"avatar_url":"https://avatars.githubusercontent.com/u/7395421?v=3","gravatar_id":"","url":"https://api.github.com/users/ebragge","html_url":"https://github.com/ebragge","followers_url":"https://api.github.com/users/ebragge/followers","following_url":"https://api.github.com/users/ebragge/following{/other_user}","gists_url":"https://api.github.com/users/ebragge/gists{/gist_id}","starred_url":"https://api.github.com/users/ebragge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebragge/subscriptions","organizations_url":"https://api.github.com/users/ebragge/orgs","repos_url":"https://api.github.com/users/ebragge/repos","events_url":"https://api.github.com/users/ebragge/events{/privacy}","received_events_url":"https://api.github.com/users/ebragge/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-10T18:59:09Z","updated_at":"2016-03-11T13:47:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3e175612efa76eec4f3a2880fac144906ab0f32","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CatalystCode/react-native/pulls/247/commits","review_comments_url":"https://api.github.com/repos/CatalystCode/react-native/pulls/247/comments","review_comment_url":"https://api.github.com/repos/CatalystCode/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CatalystCode/react-native/issues/247/comments","statuses_url":"https://api.github.com/repos/CatalystCode/react-native/statuses/0cd789ab3ed7463b976c5c074c80eb0bf6b94fec","head":{"label":"CatalystCode:Issue#136","ref":"Issue#136","sha":"0cd789ab3ed7463b976c5c074c80eb0bf6b94fec","user":{"login":"CatalystCode","id":12663554,"avatar_url":"https://avatars.githubusercontent.com/u/12663554?v=3","gravatar_id":"","url":"https://api.github.com/users/CatalystCode","html_url":"https://github.com/CatalystCode","followers_url":"https://api.github.com/users/CatalystCode/followers","following_url":"https://api.github.com/users/CatalystCode/following{/other_user}","gists_url":"https://api.github.com/users/CatalystCode/gists{/gist_id}","starred_url":"https://api.github.com/users/CatalystCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CatalystCode/subscriptions","organizations_url":"https://api.github.com/users/CatalystCode/orgs","repos_url":"https://api.github.com/users/CatalystCode/repos","events_url":"https://api.github.com/users/CatalystCode/events{/privacy}","received_events_url":"https://api.github.com/users/CatalystCode/received_events","type":"Organization","site_admin":false},"repo":{"id":48009214,"name":"react-native","full_name":"CatalystCode/react-native","owner":{"login":"CatalystCode","id":12663554,"avatar_url":"https://avatars.githubusercontent.com/u/12663554?v=3","gravatar_id":"","url":"https://api.github.com/users/CatalystCode","html_url":"https://github.com/CatalystCode","followers_url":"https://api.github.com/users/CatalystCode/followers","following_url":"https://api.github.com/users/CatalystCode/following{/other_user}","gists_url":"https://api.github.com/users/CatalystCode/gists{/gist_id}","starred_url":"https://api.github.com/users/CatalystCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CatalystCode/subscriptions","organizations_url":"https://api.github.com/users/CatalystCode/orgs","repos_url":"https://api.github.com/users/CatalystCode/repos","events_url":"https://api.github.com/users/CatalystCode/events{/privacy}","received_events_url":"https://api.github.com/users/CatalystCode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CatalystCode/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/CatalystCode/react-native","forks_url":"https://api.github.com/repos/CatalystCode/react-native/forks","keys_url":"https://api.github.com/repos/CatalystCode/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CatalystCode/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CatalystCode/react-native/teams","hooks_url":"https://api.github.com/repos/CatalystCode/react-native/hooks","issue_events_url":"https://api.github.com/repos/CatalystCode/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/CatalystCode/react-native/events","assignees_url":"https://api.github.com/repos/CatalystCode/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/CatalystCode/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/CatalystCode/react-native/tags","blobs_url":"https://api.github.com/repos/CatalystCode/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CatalystCode/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CatalystCode/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/CatalystCode/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CatalystCode/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/CatalystCode/react-native/languages","stargazers_url":"https://api.github.com/repos/CatalystCode/react-native/stargazers","contributors_url":"https://api.github.com/repos/CatalystCode/react-native/contributors","subscribers_url":"https://api.github.com/repos/CatalystCode/react-native/subscribers","subscription_url":"https://api.github.com/repos/CatalystCode/react-native/subscription","commits_url":"https://api.github.com/repos/CatalystCode/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/CatalystCode/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/CatalystCode/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/CatalystCode/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/CatalystCode/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/CatalystCode/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CatalystCode/react-native/merges","archive_url":"https://api.github.com/repos/CatalystCode/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CatalystCode/react-native/downloads","issues_url":"https://api.github.com/repos/CatalystCode/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/CatalystCode/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/CatalystCode/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/CatalystCode/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CatalystCode/react-native/labels{/name}","releases_url":"https://api.github.com/repos/CatalystCode/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/CatalystCode/react-native/deployments","created_at":"2015-12-15T00:16:54Z","updated_at":"2016-02-27T04:16:50Z","pushed_at":"2016-03-11T12:41:29Z","git_url":"git://github.com/CatalystCode/react-native.git","ssh_url":"git@github.com:CatalystCode/react-native.git","clone_url":"https://github.com/CatalystCode/react-native.git","svn_url":"https://github.com/CatalystCode/react-native","homepage":"http://facebook.github.io/react-native/","size":138815,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":55,"forks":1,"open_issues":55,"watchers":8,"default_branch":"master"}},"base":{"label":"CatalystCode:ReactWindows","ref":"ReactWindows","sha":"6cf9ca327644ed614a23eb564c41f96826a6c71c","user":{"login":"CatalystCode","id":12663554,"avatar_url":"https://avatars.githubusercontent.com/u/12663554?v=3","gravatar_id":"","url":"https://api.github.com/users/CatalystCode","html_url":"https://github.com/CatalystCode","followers_url":"https://api.github.com/users/CatalystCode/followers","following_url":"https://api.github.com/users/CatalystCode/following{/other_user}","gists_url":"https://api.github.com/users/CatalystCode/gists{/gist_id}","starred_url":"https://api.github.com/users/CatalystCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CatalystCode/subscriptions","organizations_url":"https://api.github.com/users/CatalystCode/orgs","repos_url":"https://api.github.com/users/CatalystCode/repos","events_url":"https://api.github.com/users/CatalystCode/events{/privacy}","received_events_url":"https://api.github.com/users/CatalystCode/received_events","type":"Organization","site_admin":false},"repo":{"id":48009214,"name":"react-native","full_name":"CatalystCode/react-native","owner":{"login":"CatalystCode","id":12663554,"avatar_url":"https://avatars.githubusercontent.com/u/12663554?v=3","gravatar_id":"","url":"https://api.github.com/users/CatalystCode","html_url":"https://github.com/CatalystCode","followers_url":"https://api.github.com/users/CatalystCode/followers","following_url":"https://api.github.com/users/CatalystCode/following{/other_user}","gists_url":"https://api.github.com/users/CatalystCode/gists{/gist_id}","starred_url":"https://api.github.com/users/CatalystCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CatalystCode/subscriptions","organizations_url":"https://api.github.com/users/CatalystCode/orgs","repos_url":"https://api.github.com/users/CatalystCode/repos","events_url":"https://api.github.com/users/CatalystCode/events{/privacy}","received_events_url":"https://api.github.com/users/CatalystCode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CatalystCode/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/CatalystCode/react-native","forks_url":"https://api.github.com/repos/CatalystCode/react-native/forks","keys_url":"https://api.github.com/repos/CatalystCode/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CatalystCode/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CatalystCode/react-native/teams","hooks_url":"https://api.github.com/repos/CatalystCode/react-native/hooks","issue_events_url":"https://api.github.com/repos/CatalystCode/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/CatalystCode/react-native/events","assignees_url":"https://api.github.com/repos/CatalystCode/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/CatalystCode/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/CatalystCode/react-native/tags","blobs_url":"https://api.github.com/repos/CatalystCode/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CatalystCode/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CatalystCode/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/CatalystCode/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CatalystCode/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/CatalystCode/react-native/languages","stargazers_url":"https://api.github.com/repos/CatalystCode/react-native/stargazers","contributors_url":"https://api.github.com/repos/CatalystCode/react-native/contributors","subscribers_url":"https://api.github.com/repos/CatalystCode/react-native/subscribers","subscription_url":"https://api.github.com/repos/CatalystCode/react-native/subscription","commits_url":"https://api.github.com/repos/CatalystCode/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/CatalystCode/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/CatalystCode/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/CatalystCode/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/CatalystCode/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/CatalystCode/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CatalystCode/react-native/merges","archive_url":"https://api.github.com/repos/CatalystCode/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CatalystCode/react-native/downloads","issues_url":"https://api.github.com/repos/CatalystCode/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/CatalystCode/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/CatalystCode/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/CatalystCode/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CatalystCode/react-native/labels{/name}","releases_url":"https://api.github.com/repos/CatalystCode/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/CatalystCode/react-native/deployments","created_at":"2015-12-15T00:16:54Z","updated_at":"2016-02-27T04:16:50Z","pushed_at":"2016-03-11T12:41:29Z","git_url":"git://github.com/CatalystCode/react-native.git","ssh_url":"git@github.com:CatalystCode/react-native.git","clone_url":"https://github.com/CatalystCode/react-native.git","svn_url":"https://github.com/CatalystCode/react-native","homepage":"http://facebook.github.io/react-native/","size":138815,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":55,"forks":1,"open_issues":55,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CatalystCode/react-native/pulls/247"},"html":{"href":"https://github.com/CatalystCode/react-native/pull/247"},"issue":{"href":"https://api.github.com/repos/CatalystCode/react-native/issues/247"},"comments":{"href":"https://api.github.com/repos/CatalystCode/react-native/issues/247/comments"},"review_comments":{"href":"https://api.github.com/repos/CatalystCode/react-native/pulls/247/comments"},"review_comment":{"href":"https://api.github.com/repos/CatalystCode/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CatalystCode/react-native/pulls/247/commits"},"statuses":{"href":"https://api.github.com/repos/CatalystCode/react-native/statuses/0cd789ab3ed7463b976c5c074c80eb0bf6b94fec"}}}}