SecurityContext.SuppressFlow Método

Definição

Suprime o fluxo do contexto de segurança entre threads assíncronos.Suppresses the flow of the security context across asynchronous threads.

public:
 static System::Threading::AsyncFlowControl SuppressFlow();
public static System.Threading.AsyncFlowControl SuppressFlow ();
[System.Security.SecurityCritical]
public static System.Threading.AsyncFlowControl SuppressFlow ();
static member SuppressFlow : unit -> System.Threading.AsyncFlowControl
[<System.Security.SecurityCritical>]
static member SuppressFlow : unit -> System.Threading.AsyncFlowControl
Public Shared Function SuppressFlow () As AsyncFlowControl

Retornos

AsyncFlowControl

Uma estrutura AsyncFlowControl para restaurar o fluxo.An AsyncFlowControl structure for restoring the flow.

Atributos

Comentários

Use este método para suprimir o fluxo de SecurityContext informações no thread atual para operações assíncronas.Use this method to suppress the flow of SecurityContext information on the current thread for asynchronous operations.

O Common Language Runtime (CLR) só está ciente das operações de representação executadas usando código gerenciado.The common language runtime (CLR) is only aware of the impersonation operations performed using managed code. O CLR não tem conhecimento de representação realizada fora do código gerenciado, como invocações de plataforma para código não gerenciado que faz a representação ou por meio de chamadas para funções do Win32.The CLR has no knowledge of impersonation performed outside of managed code, such as platform invokes to unmanaged code that does the impersonation, or through calls to Win32 functions. Para fluir a identidade entre pontos assíncronos, você deve usar os WindowsIdentity métodos e gerenciados WindowsImpersonationContext .To flow identity across asynchronous points you must use the managed WindowsIdentity and WindowsImpersonationContext methods.

Use o Undo método na estrutura retornada AsyncFlowControl para retornar o SecurityContext objeto ao seu estado anterior.Use the Undo method on the returned AsyncFlowControl structure to return the SecurityContext object to its previous state.

Esse método é protegido com uma SecurityAction.LinkDemand SecurityPermissionFlag.Infrastructure permissão para.This method is protected with a SecurityAction.LinkDemand for SecurityPermissionFlag.Infrastructure permission. Um componente totalmente confiável pode chamar esse método para suprimir o fluxo das SecurityContext informações durante chamadas assíncronas.A fully trusted component can call this method to suppress the flow of the SecurityContext information during asynchronous calls. Quando o fluxo é suprimido, o Capture método retorna null .When the flow is suppressed, the Capture method returns null.

Aplica-se a