@@ -19,135 +19,31 @@ public interface IContextDictionary : IMobileObject, IDictionary, ICollection, I
19
19
/// <returns>The value associated with the specified key, or null if the key does not exist.</returns>
20
20
object GetValueOrNull ( string key ) ;
21
21
22
- /// <summary>
23
- /// Attempts to add the specified key and value to the ContextDictionary.
24
- /// </summary>
25
- /// <param name="key">The key of the element to add.</param>
26
- /// <param name="value">The value of the element to add. The value can be null for reference types.</param>
27
- /// <returns>
28
- /// true if the key/value pair was added to the ContextDictionary
29
- /// successfully; false if the key already exists.
30
- /// </returns>
31
- /// <exception cref="System.ArgumentNullException">key is null.</exception>
32
- /// <exception cref="System.OverflowException">The dictionary already contains the maximum number of elements (System.Int32.MaxValue).</exception>
22
+ /// <inheritdoc cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}.TryAdd(TKey, TValue)"/>
33
23
bool TryAdd ( object key , object value ) ;
34
24
35
- /// <summary>
36
- /// Determines whether the ContextDictionary contains
37
- /// the specified key.
38
- /// </summary>
39
- /// <param name="key">The key to locate in the ContextDictionary.</param>
40
- /// <returns>
41
- /// true if the ContextDictionary contains an
42
- /// element with the specified key; otherwise, false.
43
- /// </returns>
44
- /// <exception cref="System.ArgumentNullException">key is null.</exception>
25
+ /// <inheritdoc cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}.ContainsKey(TKey)"/>
45
26
public bool ContainsKey ( object key ) ;
46
27
47
- /// <summary>
48
- /// Attempts to remove and return the value that has the specified key from the ContextDictionary.
49
- /// </summary>
50
- /// <param name="key">The key of the element to remove and return.</param>
51
- /// <param name="value">
52
- /// When this method returns, contains the object removed from the ContextDictionary,
53
- /// or the default value of the TValue type if key does not exist.
54
- /// </param>
55
- /// <returns>true if the object was removed successfully; otherwise, false.</returns>
56
- /// <exception cref="System.ArgumentNullException">key is null.</exception>
28
+ /// <inheritdoc cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}.TryRemove(TKey, out TValue)"/>
57
29
public bool TryRemove ( object key , out object value ) ;
58
30
59
- /// <summary>
60
- /// Attempts to get the value associated with the specified key from the ContextDictionary.
61
- /// </summary>
62
- /// <param name="key">The key of the value to get.</param>
63
- /// <param name="value">
64
- /// When this method returns, contains the object from the ContextDictionary
65
- /// that has the specified key, or the default value of the type if the operation
66
- /// failed.
67
- /// </param>
68
- /// <returns>true if the key was found in the ContextDictionary; otherwise, false.</returns>
69
- /// <exception cref="System.ArgumentNullException">key is null.</exception>
31
+ /// <inheritdoc cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}.TryGetValue(TKey, out TValue)"/>
70
32
public bool TryGetValue ( object key , out object value ) ;
71
33
72
- /// <summary>
73
- /// Updates the value associated with key to newValue if the existing value with
74
- /// key is equal to comparisonValue.
75
- /// </summary>
76
- /// <param name="key">The key of the value that is compared with comparisonValue and possibly replaced.</param>
77
- /// <param name="newValue">
78
- /// The value that replaces the value of the element that has the specified key if
79
- /// the comparison results in equality.
80
- /// </param>
81
- /// <param name="comparisonValue">
82
- /// The value that is compared with the value of the element that has the specified
83
- /// key.
84
- /// </param>
85
- /// <returns>true if the value with key was equal to comparisonValue and was replaced with newValue; otherwise, false.</returns>
86
- /// <exception cref="System.ArgumentNullException">key is null.</exception>
34
+ /// <inheritdoc cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}.TryUpdate(TKey, TValue, TValue)"/>
87
35
bool TryUpdate ( object key , object newValue , object comparisonValue ) ;
88
36
89
- /// <summary>
90
- /// Adds a key/value pair to the ContextDictionary
91
- /// by using the specified function if the key does not already exist. Returns the
92
- /// new value, or the existing value if the key exists.
93
- /// </summary>
94
- /// <param name="key">The key of the element to add.</param>
95
- /// <param name="valueFactory">The function used to generate a value for the key.</param>
96
- /// <returns>
97
- /// The value for the key. This will be either the existing value for the key if
98
- /// the key is already in the dictionary, or the new value if the key was not in
99
- /// the dictionary.
100
- /// </returns>
101
- /// <exception cref="System.ArgumentNullException">key or valueFactory is null.</exception>
102
- /// <exception cref="System.OverflowException">The dictionary already contains the maximum number of elements (System.Int32.MaxValue).</exception>
37
+ /// <inheritdoc cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/>
103
38
object GetOrAdd ( object key , Func < object , object > valueFactory ) ;
104
39
105
- /// <summary>
106
- /// Adds a key/value pair to the ContextDictionary
107
- /// if the key does not already exist. Returns the new value, or the existing value
108
- /// if the key exists.
109
- /// </summary>
110
- /// <param name="key">The key of the element to add.</param>
111
- /// <param name="value">The value to be added, if the key does not already exist.</param>
112
- /// <returns>
113
- /// The value for the key. This will be either the existing value for the key if
114
- /// the key is already in the dictionary, or the new value if the key was not in
115
- /// the dictionary.
116
- /// </returns>
117
- /// <exception cref="System.ArgumentNullException">key or valueFactory is null.</exception>
118
- /// <exception cref="System.OverflowException">The dictionary already contains the maximum number of elements (System.Int32.MaxValue).</exception>
40
+ /// <inheritdoc cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, TValue)"/>
119
41
public object GetOrAdd ( object key , object value ) ;
120
42
121
- /// <summary>
122
- /// Uses the specified functions to add a key/value pair to the ContextDictionary
123
- /// if the key does not already exist, or to update a key/value pair in the ContextDictionary
124
- /// if the key already exists.
125
- /// </summary>
126
- /// <param name="key">The key to be added or whose value should be updated.</param>
127
- /// <param name="addValueFactory">The function used to generate a value for an absent key.</param>
128
- /// <param name="updateValueFactory">The function used to generate a new value for an existing key based on the key's existing value.</param>
129
- /// <returns>
130
- /// The new value for the key. This will be either be the result of addValueFactory
131
- /// (if the key was absent) or the result of updateValueFactory (if the key was present).
132
- /// </returns>
133
- /// <exception cref="System.ArgumentNullException">key, addValueFactory, or updateValueFactory is null.</exception>
134
- /// <exception cref="System.OverflowException">The dictionary already contains the maximum number of elements (System.Int32.MaxValue).</exception>
43
+ /// <inheritdoc cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}.AddOrUpdate(TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/>
135
44
public object AddOrUpdate ( object key , Func < object , object > addValueFactory , Func < object , object , object > updateValueFactory ) ;
136
45
137
- /// <summary>
138
- /// Adds a key/value pair to the ContextDictionary
139
- /// if the key does not already exist, or updates a key/value pair in the ContextDictionary
140
- /// by using the specified function if the key already exists.
141
- /// </summary>
142
- /// <param name="key">The key to be added or whose value should be updated.</param>
143
- /// <param name="addValue">The value to be added for an absent key.</param>
144
- /// <param name="updateValueFactory">The function used to generate a new value for an existing key based on the key's existing value.</param>
145
- /// <returns>
146
- /// The new value for the key. This will be either be addValue (if the key was absent)
147
- /// or the result of updateValueFactory (if the key was present).
148
- /// </returns>
149
- /// <exception cref="System.ArgumentNullException">key or updateValueFactory is null.</exception>
150
- /// <exception cref="System.OverflowException">The dictionary already contains the maximum number of elements (System.Int32.MaxValue).</exception>
46
+ /// <inheritdoc cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}.AddOrUpdate(TKey, TValue, Func{TKey, TValue, TValue})"/>
151
47
public object AddOrUpdate ( object key , object addValue , Func < object , object , object > updateValueFactory ) ;
152
48
}
153
49
}
0 commit comments