GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Electron.NET/src/ElectronNET.API/API/Process.cs at develop · ElectronNET/Electron.NET Expand file tree/ Copy pathProcess.csMore file actions 109 lines (92 loc) · 4.19 KB / Copy pathProcess.csFile metadata and controls109 lines (92 loc) · 4.19 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 using ElectronNET.API.Entities; using ElectronNET.API.Serialization; using System.Text.Json; using System.Threading.Tasks; namespace ElectronNET.API { /// <summary> /// Electron's process object is extended from the Node.js process object. It adds the /// events, properties, and methods. /// </summary> public sealed class Process : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketTaskMessageNameTypes SocketTaskMessageNameType => SocketTaskMessageNameTypes.DashesLowerFirst; internal Process() { } internal static Process Instance { get { if (_process == null) { lock (_syncRoot) { if (_process == null) { _process = new Process(); } } } return _process; } } private static Process _process; private static readonly object _syncRoot = new(); /// <summary> /// The process.execPath property returns the absolute pathname of the executable that /// started the Node.js process. Symbolic links, if any, are resolved. /// </summary> public Task<string> ExecPathAsync => this.InvokeAsync<string>(); /// <summary> /// The process.argv property returns an array containing the command-line arguments passed /// when the Node.js process was launched. The first element will be process.execPath. See /// process.argv0 if access to the original value of argv[0] is needed. The second element /// will be the path to the JavaScript file being executed. The remaining elements will be /// any additional command-line arguments /// </summary> public Task<string[]> ArgvAsync => this.InvokeAsync<string[]>(); /// <summary> /// The process.execPath property returns the absolute pathname of the executable that /// started the Node.js process. Symbolic links, if any, are resolved. /// </summary> public Task<string> TypeAsync => this.InvokeAsync<string>(); /// <summary> /// The process.versions property returns an object listing the version strings of /// chrome and electron. /// </summary> public Task<ProcessVersions> VersionsAsync => this.InvokeAsync<ProcessVersions>(); /// <summary> /// A Boolean. When app is started by being passed as parameter to the default app, this /// property is true in the main process, otherwise it is false. /// </summary> public Task<bool> DefaultAppAsync => this.InvokeAsync<bool>(); /// <summary> /// A Boolean, true when the current renderer context is the "main" renderer frame. If you /// want the ID of the current frame you should use webFrame.routingId /// </summary> public Task<bool> IsMainFrameAsync => this.InvokeAsync<bool>(); /// <summary> /// A String representing the path to the resources directory. /// </summary> public Task<string> ResourcesPathAsync => this.InvokeAsync<string>(); /// <summary> /// The number of seconds the current Node.js process has been running. The return value /// includes fractions of a second. Use Math.floor() to get whole seconds. /// </summary> public Task<double> UpTimeAsync => this.InvokeAsync<double>(); /// <summary> /// The PID of the electron process /// </summary> public Task<int> PidAsync => this.InvokeAsync<int>(); /// <summary> /// The operating system CPU architecture for which the Node.js binary was compiled /// </summary> public Task<string> ArchAsync => this.InvokeAsync<string>(); /// <summary> /// A string identifying the operating system platform on which the Node.js process is running /// </summary> public Task<string> PlatformAsync => this.InvokeAsync<string>(); } } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |