Delen via


TeamFoundationCacheService<TKey, TValue>.Add Method

Adds an item to the cache. If an item with the specified key already occurs in the cached, then new item is not added to the dictionary and the method return an item that is already in a cache.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Function Add ( _
    requestContext As TeamFoundationRequestContext, _
    key As TKey, _
    value As TValue _
) As TValue
public TValue Add(
    TeamFoundationRequestContext requestContext,
    TKey key,
    TValue value
)
public:
TValue Add(
    TeamFoundationRequestContext^ requestContext, 
    TKey key, 
    TValue value
)
member Add : 
        requestContext:TeamFoundationRequestContext * 
        key:'TKey * 
        value:'TValue -> 'TValue 
public function Add(
    requestContext : TeamFoundationRequestContext, 
    key : TKey, 
    value : TValue
) : TValue

Parameters

Return Value

Type: TValue
Returns {0}.

Remarks

This method is thread safe.

.NET Framework Security

See Also

Reference

TeamFoundationCacheService<TKey, TValue> Class

Microsoft.TeamFoundation.Framework.Server Namespace