NodejsPlatform class
Manages a Node.js platform instance, provided by libnode
.
C#
public sealed class NodejsPlatform : IDisposable
Public Members
name | description |
---|---|
NodejsPlatform(…) | Initializes the Node.js platform. |
static Current { get; } | Gets the Node.js platform instance for the current process, or null if not initialized. |
IsDisposed { get; } | Gets a value indicating whether the current platform has been disposed. |
Runtime { get; } | |
CreateEnvironment(…) | Creates a new Node.js environment with a dedicated main thread. |
Dispose() | Disposes the platform. After disposal, another platform instance may not be initialized in the current process. |
implicit operator |
Remarks
Only one Node.js platform instance can be created per process. Once the platform is disposed, another platform instance cannot be re-initialized. One or more NodejsEnvironment
instances may be created using the platform.