WindowsIdentity.RunImpersonatedAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RunImpersonatedAsync(SafeAccessTokenHandle, Func<Task>) |
Runs the specified asynchronous action as the impersonated Windows identity. |
RunImpersonatedAsync<T>(SafeAccessTokenHandle, Func<Task<T>>) |
Runs the specified asynchronous action as the impersonated Windows identity. |
RunImpersonatedAsync(SafeAccessTokenHandle, Func<Task>)
Runs the specified asynchronous action as the impersonated Windows identity.
public:
static System::Threading::Tasks::Task ^ RunImpersonatedAsync(Microsoft::Win32::SafeHandles::SafeAccessTokenHandle ^ safeAccessTokenHandle, Func<System::Threading::Tasks::Task ^> ^ func);
public static System.Threading.Tasks.Task RunImpersonatedAsync (Microsoft.Win32.SafeHandles.SafeAccessTokenHandle safeAccessTokenHandle, Func<System.Threading.Tasks.Task> func);
static member RunImpersonatedAsync : Microsoft.Win32.SafeHandles.SafeAccessTokenHandle * Func<System.Threading.Tasks.Task> -> System.Threading.Tasks.Task
Public Shared Function RunImpersonatedAsync (safeAccessTokenHandle As SafeAccessTokenHandle, func As Func(Of Task)) As Task
Parameters
- safeAccessTokenHandle
- SafeAccessTokenHandle
The handle of the impersonated Windows identity.
Returns
A task that represents the asynchronous operation of the provided Func<TResult>.
Applies to
RunImpersonatedAsync<T>(SafeAccessTokenHandle, Func<Task<T>>)
Runs the specified asynchronous action as the impersonated Windows identity.
public:
generic <typename T>
static System::Threading::Tasks::Task<T> ^ RunImpersonatedAsync(Microsoft::Win32::SafeHandles::SafeAccessTokenHandle ^ safeAccessTokenHandle, Func<System::Threading::Tasks::Task<T> ^> ^ func);
public static System.Threading.Tasks.Task<T> RunImpersonatedAsync<T> (Microsoft.Win32.SafeHandles.SafeAccessTokenHandle safeAccessTokenHandle, Func<System.Threading.Tasks.Task<T>> func);
static member RunImpersonatedAsync : Microsoft.Win32.SafeHandles.SafeAccessTokenHandle * Func<System.Threading.Tasks.Task<'T>> -> System.Threading.Tasks.Task<'T>
Public Shared Function RunImpersonatedAsync(Of T) (safeAccessTokenHandle As SafeAccessTokenHandle, func As Func(Of Task(Of T))) As Task(Of T)
Type Parameters
- T
The type of the object to return.
Parameters
- safeAccessTokenHandle
- SafeAccessTokenHandle
The handle of the impersonated Windows identity.
Returns
A task that represents the asynchronous operation of func
.
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για