Share via


MRUSecurityTokenCache.Add Method

Adds a security token to the cache using the specified identifier as the key.

Namespace: Microsoft.Web.Services3.Security.Tokens
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Dim identifier As String
Dim token As SecurityToken
Dim mRUSecurityTokenCache1 As MRUSecurityTokenCache
mRUSecurityTokenCache1.Add(identifier, token)

Syntax

'Declaration
Public Overridable Sub Add( _
    ByVal identifier As String, _
    ByVal token As SecurityToken _
)
public virtual void Add(
    string identifier, 
    SecurityToken token
);
public:
virtual void Add(
    String^ identifier,
    SecurityToken^ token
);
public virtual void Add(
    System.String identifier, 
    SecurityToken token
);
public function Add(
     identifier : String, 
     token : SecurityToken
) : Void;

Parameters

  • identifier
    The identifier for the security token that is to be used as its key in the cache.

Exceptions

Exception type Condition
ArgumentNullException

token is null.

Exception

token has expired.

Remarks

If the cache is full when the Add method is called, all tokens that are expired are removed from the collection to make room for the new item. If the cache is still at capacity, the least recently used token is removed from the cache to make room for the new item.

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 XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

MRUSecurityTokenCache Class
MRUSecurityTokenCache Members
Microsoft.Web.Services3.Security.Tokens Namespace