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