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