public static T InvokeWithElevatedPrivilege <T>([NotNull] this ServiceController thisValue, [NotNull] Func <ServiceController, T> action) { return(ImpersonationHelper.RunWithElevatedPrivilege(() => action(thisValue))); }
public static void InvokeWithElevatedPrivilege([NotNull] this ServiceController thisValue, [NotNull] Action <ServiceController> action) { ImpersonationHelper.RunWithElevatedPrivilege(() => action(thisValue)); }