This repository was archived by the owner on Mar 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathProcess.cs
More file actions
132 lines (89 loc) · 3.52 KB
/
Process.cs
File metadata and controls
132 lines (89 loc) · 3.52 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
namespace NodeJS {
[Imported]
[Serializable]
public class MemoryUsage {
public int Rss { get; set; }
public int HeapTotal { get; set; }
public int HeapUsed { get; set; }
}
[Imported]
[ModuleName(null)]
[IgnoreNamespace]
[ScriptName("process")]
public static class Process {
[IntrinsicProperty]
public static WritableStream Stdout { get { return null; } }
[IntrinsicProperty]
public static WritableStream Stderr { get { return null; } }
[IntrinsicProperty]
public static ReadableStream Stdin { get { return null; } }
[IntrinsicProperty]
public static string[] Argv { get { return null; } }
[IntrinsicProperty]
public static string ExecPath { get { return null; } }
public static void Abort() {}
public static void Chdir(string directory) {}
public static string Cwd { [ScriptName("cwd")] get { return null; } }
[IntrinsicProperty]
public static JsDictionary<string, string> Env { get { return null; } }
public static void Exit() {}
public static void Exit(int code) {}
[ScriptName("getgid")]
public static int GetGID() { return 0; }
[ScriptName("setgid")]
public static void SetGID(int id) {}
[ScriptName("getuid")]
public static int GetUID() { return 0; }
[ScriptName("setuid")]
public static void SetUID(int id) {}
[IntrinsicProperty]
public static string Version { get { return null; } }
[IntrinsicProperty]
public static JsDictionary<string, string> Versions { get { return null; } }
[IntrinsicProperty]
public static dynamic Config { get { return null; } }
public static void Kill(int pid) {}
public static void Kill(int pid, string signal) {}
[IntrinsicProperty]
public static int Pid { get { return 0; } }
[IntrinsicProperty]
public static string Title { get; set; }
[IntrinsicProperty]
public static string Arch { get { return null; } }
[IntrinsicProperty]
public static string Platform { get { return null; } }
public static MemoryUsage MemoryUsage { [ScriptName("memoryUsage")] get { return null; } }
public static void NextTick(Action callback) {}
[ScriptName("umask")]
public static int UMask() { return 0; }
[ScriptName("umask")]
public static int UMask(int mask) { return 0; }
public static double Uptime() { return 0; }
public static int[] Hrtime() { return null; }
public static int[] Hrtime(int[] relativeTo) { return null; }
// EventEmitter
public static void AddListener(string @event, Delegate listener) {}
public static void On(string @event, Delegate listener) {}
public static void Once(string @event, Delegate listener) {}
public static void RemoveListener(string @event, Delegate listener) {}
public static void RemoveAllListeners(string @event) {}
public static void SetMaxListeners(int n) {}
public static Delegate[] Listeners(string @event) { return null; }
public static event Action OnExit {
[InlineCode("process.addListener('exit', {value})")] add {}
[InlineCode("process.removeListener('exit', {value})")] remove {}
}
[InlineCode("process.once('exit', {callback})")]
public static void OnceExit(Action callback) {}
public static event Action<Error> OnUncaughtException {
[InlineCode("process.addListener('uncaughtException', {value})")] add {}
[InlineCode("process.removeListener('uncaughtException', {value})")] remove {}
}
[InlineCode("process.once('uncaughtException', {callback})")]
public static void OnceUncaughtException(Action<Error> callback) {}
}
}