You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Gets a <see cref="UserAccess"/> cached for a particular key, updating the value if necessary.
20
+
/// </summary>
21
+
/// <remarks>
22
+
/// This method returns a previously cached <see cref="UserAccess"/> when possible. If any
23
+
/// of the following conditions are met, the <paramref name="refreshCallback"/> function
24
+
/// will be called to obtain a new value for <paramref name="key"/> which is then added to
25
+
/// the cache, replacing any previously cached value.
26
+
///
27
+
/// <list type="bullet">
28
+
/// <item>The cache does not contain any value associated with <paramref name="key"/>.</item>
29
+
/// <item><paramref name="forceCacheRefresh"/> is <c>true</c>.</item>
30
+
/// <item>The previously cached <see cref="UserAccess"/> for <paramref name="key"/> has expired
31
+
/// (see <see cref="IdentityToken.IsExpired()"/>).</item>
32
+
/// </list>
33
+
///
34
+
/// <para>If any of the above conditions is met and <paramref name="refreshCallback"/> is <c>null</c>,
35
+
/// the previously cached value for <paramref name="key"/>, if any, is removed from the cache
36
+
/// and the method returns <c>null</c>.</para>
37
+
/// </remarks>
38
+
/// <param name="key">The key.</param>
39
+
/// <param name="refreshCallback">A function which returns a new value for the specified <paramref name="key"/>,
40
+
/// or <c>null</c> if no update function available (see remarks). This function may perform a synchronous
41
+
/// authentication to an <see cref="IIdentityProvider"/>.</param>
42
+
/// <param name="forceCacheRefresh">If <c>true</c>, the value associated with <paramref name="key"/> will be always be refreshed by calling <paramref name="refreshCallback"/>, even if a value is already cached.</param>
43
+
/// <returns>
44
+
/// The cached <see cref="UserAccess"/> associated with the specified <paramref name="key"/>.
45
+
/// If no cached value is available (see remarks), the method returns <c>null</c>.
46
+
/// </returns>
47
+
/// <exception cref="ArgumentNullException">If <paramref name="key"/> is <c>null</c>.</exception>
/// Represents a thread-safe cache of objects identified by string keys.
126
+
/// </summary>
127
+
/// <typeparam name="T">Type type of objects stored in the cache.</typeparam>
87
128
publicinterfaceICache<T>
88
129
{
130
+
/// <summary>
131
+
/// Gets a value cached for a particular key, updating the value if necessary.
132
+
/// </summary>
133
+
/// <remarks>
134
+
/// This method returns a previously cached value when possible. If any of the following
135
+
/// conditions are met, the <paramref name="refreshCallback"/> function will be called to
136
+
/// obtain a new value for <paramref name="key"/> which is then added to the cache,
137
+
/// replacing any previously cached value.
138
+
///
139
+
/// <list type="bullet">
140
+
/// <item>The cache does not contain any value associated with <paramref name="key"/>.</item>
141
+
/// <item><paramref name="forceCacheRefresh"/> is <c>true</c>.</item>
142
+
/// <item>The previously cached value for <paramref name="key"/> is no longer valid. The exact
143
+
/// algorithm for determining whether or not a value is valid in implementation-defined.</item>
144
+
/// </list>
145
+
///
146
+
/// <para>If any of the above conditions is met and <paramref name="refreshCallback"/> is <c>null</c>,
147
+
/// the previously cached value for <paramref name="key"/>, if any, is removed from the cache
148
+
/// and the default value for <typeparamref name="T"/> is returned.</para>
149
+
/// </remarks>
150
+
/// <param name="key">The key.</param>
151
+
/// <param name="refreshCallback">A function which returns a new value for the specified <paramref name="key"/>, or <c>null</c> if no update function available (see remarks).</param>
152
+
/// <param name="forceCacheRefresh">If <c>true</c>, the value associated with <paramref name="key"/> will be always be refreshed by calling <paramref name="refreshCallback"/>, even if a value is already cached.</param>
153
+
/// <returns>
154
+
/// The cached value associated with the specified <paramref name="key"/>. If no cached value is
155
+
/// available (see remarks), the method returns the default value for <typeparamref name="T"/>.
156
+
/// </returns>
157
+
/// <exception cref="ArgumentNullException">If <paramref name="key"/> is <c>null</c>.</exception>
/// This interface represents an object that can extract metadata information from a
9
+
/// collection of HTTP headers returned from a REST request.
10
+
/// </summary>
6
11
publicinterfaceIObjectStorageMetadataProcessor
7
12
{
13
+
/// <summary>
14
+
/// Extracts metadata information from a collection of HTTP headers. The returned collection
15
+
/// may include multiple types of metadata information. The keys of the collection represent
16
+
/// the type of metadata, and the values are key-value collections of the corresponding
17
+
/// metadata.
18
+
/// </summary>
19
+
/// <param name="httpHeaders">The collection of HTTP headers.</param>
20
+
/// <returns>The metadata.</returns>
21
+
/// <exception cref="ArgumentNullException">If <paramref name="httpHeaders"/> is <c>null</c>.</exception>
22
+
/// <exception cref="ArgumentException">If <paramref name="httpHeaders"/> contains two headers with equivalent values for <see cref="HttpHeader.Key"/> (case-insensitive).</exception>
Copy file name to clipboardExpand all lines: src/corelib/Providers/Rackspace/CloudFilesMetadataProcessor.cs
+25-1Lines changed: 25 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
usingSystem.Collections.Generic;
1
+
usingSystem;
2
+
usingSystem.Collections.Generic;
2
3
usingJSIStudios.SimpleRESTServices.Client;
3
4
usingnet.openstack.Core;
4
5
@@ -22,8 +23,31 @@ public static CloudFilesMetadataProcessor Default
22
23
}
23
24
}
24
25
26
+
/// <summary>
27
+
/// Extracts metadata information from a collection of HTTP headers.
28
+
/// </summary>
29
+
/// <remarks>
30
+
/// The returned collection has two keys: <see cref="CloudFilesProvider.ProcessedHeadersHeaderKey"/>
31
+
/// and <see cref="CloudFilesProvider.ProcessedHeadersMetadataKey"/>.
32
+
///
33
+
/// <para>The value for
34
+
/// <see cref="CloudFilesProvider.ProcessedHeadersMetadataKey"/> contains the processed Cloud Files
35
+
/// metadata included in HTTP headers such as <strong>X-Account-Meta-*</strong>,
36
+
/// <strong>X-Container-Meta-*</strong>, and <strong>X-Object-Meta-*</strong>. The metadata prefix
37
+
/// has been removed from the keys stored in this value.</para>
38
+
///
39
+
/// <para>The value for <see cref="CloudFilesProvider.ProcessedHeadersHeaderKey"/> contains the
40
+
/// HTTP headers which were not in the form of a known Cloud Files metadata prefix.</para>
41
+
/// </remarks>
42
+
/// <param name="httpHeaders">The collection of HTTP headers.</param>
43
+
/// <returns>The metadata.</returns>
44
+
/// <exception cref="ArgumentNullException">If <paramref name="httpHeaders"/> is <c>null</c>.</exception>
45
+
/// <exception cref="ArgumentException">If <paramref name="httpHeaders"/> contains two headers with equivalent values for <see cref="HttpHeader.Key"/> (case-insensitive).</exception>
0 commit comments