Adds an entry to the cache and returns a value that indicates if the operation was successful.
Namespace: Microsoft.IdentityModel
Assembly: Microsoft.IdentityModel (in microsoft.identitymodel.dll)

Usage

Visual Basic
Dim instance As MruSecurityTokenCache
Dim key As Object
Dim value As SecurityToken
Dim returnValue As Boolean

returnValue = instance.TryAddEntry(key, value)

Syntax

Visual Basic
Public Overrides Function TryAddEntry ( _
		key As Object, _
		value As SecurityToken _
) As Boolean
C#
public override bool TryAddEntry (
		Object key,
		SecurityToken value
)
C++
public:
virtual bool TryAddEntry (
		Object^ key, 
		SecurityToken^ value
) override
J#
public boolean TryAddEntry (
		Object key, 
		SecurityToken value
)
JScript
public override function TryAddEntry (
		key : Object, 
		value : SecurityToken
) : boolean

Parameters

key

The key for the entry to be added.

value

The security token to be added to the cache.

Return Value

True if key is not already present, False otherwise.

Exceptions

Exception type Condition

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2008, Windows Vista, Not tested on Windows XP

See Also