Partager via


Méthode MruSecurityTokenCache.TryReplaceEntry

Attempts to replace an existing entry in the cache with a new one.

Espace de noms: Microsoft.IdentityModel
Assembly : Microsoft.IdentityModel (dans microsoft.identitymodel.dll)

Utilisation

    Dim instance As MruSecurityTokenCache
Dim key As Object
Dim newValue As SecurityToken
Dim returnValue As Boolean

returnValue = instance.TryReplaceEntry(key, newValue)

Syntaxe

'Déclaration
Public Overrides Function TryReplaceEntry ( _
    key As Object, _
    newValue As SecurityToken _
) As Boolean
public override bool TryReplaceEntry (
    Object key,
    SecurityToken newValue
)
public:
virtual bool TryReplaceEntry (
    Object^ key, 
    SecurityToken^ newValue
) override
public boolean TryReplaceEntry (
    Object key, 
    SecurityToken newValue
)
public override function TryReplaceEntry (
    key : Object, 
    newValue : SecurityToken
) : boolean

Paramètres

  • key
    The key of the entry to be retrieved.
  • newValue
    The SecurityToken which will replace the entry associated with the key.

Valeur de retour

A Boolean indicating success or failure.

Exceptions

Type d'exception Condition

Remarques

The replace operation for this MRU cache removes the existing entry and adds newValue to the head of the MRU list.

Cohérence de thread

Tous les membres statiques publics (partagés dans Visual Basic) de ce type sont thread-safe.Il n'est pas garanti que les membres d'instance soient thread-safe.

Plateformes

Plateformes de développement

Windows Server 2003, Windows Vista

Target Platforms

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

Voir aussi

Référence

Classe MruSecurityTokenCache
Membres MruSecurityTokenCache
Espace de noms Microsoft.IdentityModel