Skip to content

Pact Impersonation IImpersonator ExecuteAsync(Pact Impersonation ImpersonationSettings System Func System Threading Tasks Task )

welshronaldo edited this page May 30, 2022 · 5 revisions

IImpersonator.ExecuteAsync(ImpersonationSettings, Func<Task>) Method

Executes the provided action within the impersonated context

System.Threading.Tasks.Task ExecuteAsync(Pact.Impersonation.ImpersonationSettings settings, System.Func<System.Threading.Tasks.Task> func);

Parameters

settings Pact.Impersonation.ImpersonationSettings
Passed on a per-action basis as it's not improbable you may need to impersonate with different credentials

func System.Func<System.Threading.Tasks.Task>
The function to execute

Returns

System.Threading.Tasks.Task

Clone this wiki locally