IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
FuncPrivilegedAction.cs
Go to the documentation of this file.
1using System;
2
4{
5
6#if FIRST_PASS == false
7
11 class FuncPrivilegedAction<TResult> : global::java.security.PrivilegedAction
12 {
13
14 readonly Func<TResult> func;
15
20 public FuncPrivilegedAction(Func<TResult> func)
21 {
22 this.func = func ?? throw new ArgumentNullException(nameof(func));
23 }
24
25 public object run()
26 {
27 return func();
28 }
29
30 }
31
32#endif
33
34}
Implementation of global::java.security.PrivilegedAction that invokes a delegate.
FuncPrivilegedAction(Func< TResult > func)
Initializes a new instance.