Partager via


Méthode MruSecurityTokenCache.TryAddEntry

Adds an entry to the cache and returns a value that indicates if the operation was successful.

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

Utilisation

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

returnValue = instance.TryAddEntry(key, value)

Syntaxe

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

Paramètres

  • key
    The key for the entry to be added.
  • value
    The security token to be added to the cache.

Valeur de retour

True if key is not already present, False otherwise.

Exceptions

Type d'exception Condition

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