Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(61)

Delta Between Two Patch Sets: Src/GoogleApis/Apis/Util/Store/IDataStore.cs

Issue 13972043: Issue 351: Reimplement OAuth2 (Step 3 - Tests, Flows and Credential) (Closed) Base URL: https://google-api-dotnet-client.googlecode.com/hg/
Left Patch Set: minor Created 10 years, 10 months ago
Right Patch Set: minor Created 10 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « Src/GoogleApis/Apis/Util/IClock.cs ('k') | Src/GoogleApis/Apis/Util/Utilities.cs » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 /* 1 /*
2 Copyright 2013 Google Inc 2 Copyright 2013 Google Inc
3 3
4 Licensed under the Apache License, Version 2.0 (the "License"); 4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License. 5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at 6 You may obtain a copy of the License at
7 7
8 http://www.apache.org/licenses/LICENSE-2.0 8 http://www.apache.org/licenses/LICENSE-2.0
9 9
10 Unless required by applicable law or agreed to in writing, software 10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS, 11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and 13 See the License for the specific language governing permissions and
14 limitations under the License. 14 limitations under the License.
15 */ 15 */
16 16
17 using System; 17 using System;
18 using System.Threading.Tasks; 18 using System.Threading.Tasks;
19 19
20 namespace Google.Apis.Util.Store 20 namespace Google.Apis.Util.Store
21 { 21 {
22 /// <summary> 22 /// <summary>
23 /// Stores and manages data objects, where the key is a string and the value is an object. 23 /// Stores and manages data objects, where the key is a string and the value is an object.
24 /// <para> 24 /// <para>
25 /// <c>null</c> keys are not allowed. 25 /// <c>null</c> keys are not allowed.
26 /// </para> 26 /// </para>
27 /// </summary> 27 /// </summary>
28 public interface IDataStore 28 public interface IDataStore
29 { 29 {
30 /// <summary>Stores the given value for the given key (replacing any exi sting value).</summary> 30 /// <summary>Asynchronously stores the given value for the given key (re placing any existing value).</summary>
31 /// <typeparam name="T">The type to store in the data store</typeparam> 31 /// <typeparam name="T">The type to store in the data store</typeparam>
32 /// <param name="key">The key</param> 32 /// <param name="key">The key</param>
33 /// <param name="value">The value to store</param> 33 /// <param name="value">The value to store</param>
34 Task Store<T>(string key, T value); 34 Task StoreAsync<T>(string key, T value);
35 35
36 /// <summary> 36 /// <summary>
37 /// Deletes the given key. The type is provided here as well because the "real" saved key should contain 37 /// Asynchronously deletes the given key. The type is provided here as w ell because the "real" saved key should
38 /// type information as well, so the data store will be able to store th e same key for different types. 38 /// contain type information as well, so the data store will be able to store the same key for different types.
39 /// </summary> 39 /// </summary>
40 /// <typeparam name="T">The type to delete from the data store</typepara m> 40 /// <typeparam name="T">The type to delete from the data store</typepara m>
41 /// <param name="key">The key to delete</param> 41 /// <param name="key">The key to delete</param>
42 Task Delete<T>(string key); 42 Task DeleteAsync<T>(string key);
43 43
44 /// <summary>Returns the stored value for the given key or <c>null</c> i f not found.</summary> 44 /// <summary>Asynchronously returns the stored value for the given key o r <c>null</c> if not found.</summary>
45 /// <typeparam name="T">The type to retrieve from the data store</typepa ram> 45 /// <typeparam name="T">The type to retrieve from the data store</typepa ram>
46 /// <param name="key">The key to retrieve its value</param> 46 /// <param name="key">The key to retrieve its value</param>
47 /// <returns>The stored object</returns> 47 /// <returns>The stored object</returns>
48 Task<T> Get<T>(string key); 48 Task<T> GetAsync<T>(string key);
49 49
50 /// <summary>Clears all values in the data store.</summary> 50 /// <summary>Asynchronously clears all values in the data store.</summar y>
51 Task Clear(); 51 Task ClearAsync();
52 } 52 }
53 } 53 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b