Partager via


Méthode SecurityTokenCache.TryAddEntry

Attempts to add an entry to the cache.

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

Utilisation

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

returnValue = instance.TryAddEntry(key, value)

Syntaxe

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

Paramètres

  • key
    The key of the entry to be added.
  • value
    The associated SecurityToken to be added.

Valeur de retour

True on success. False on failure.

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 SecurityTokenCache
Membres SecurityTokenCache
Espace de noms Microsoft.IdentityModel.Tokens