Partage via


WebThreadInformation.IsImpersonating Propriété

Définition

Obtient le mode d'emprunt d'identité de thread en cours.

public:
 property bool IsImpersonating { bool get(); };
public bool IsImpersonating { get; }
member this.IsImpersonating : bool
Public ReadOnly Property IsImpersonating As Boolean

Valeur de propriété

Boolean

true si le thread s'exécute en mode d'emprunt d'identité ; sinon false.

Exemples

L’exemple de code suivant montre comment obtenir le mode d’emprunt d’identité de thread.

// Get the impersonation mode.
public string GetThreadImpersonation()
{
    return (string.Format(
        "Is impersonating: {0}",
        ThreadInformation.IsImpersonating.ToString()));
}
' Get the impersonation mode.
Public Function GetThreadImpersonation() As String
     Return String.Format( _
     "Is impersonating: {0}", _
     ThreadInformation.IsImpersonating.ToString())
End Function 'GetThreadImpersonation

S’applique à