Delen via


OutOfProcessNodeInstance Class

Definition

Caution

Use Microsoft.AspNetCore.SpaServices.Extensions

Class responsible for launching a Node child process on the local machine, determining when it is ready to accept invocations, detecting if it dies on its own, and finally terminating it on disposal.

This abstract base class uses the input/output streams of the child process to perform a simple handshake to determine when the child process is ready to accept invocations. This is agnostic to the mechanism that derived classes use to actually perform the invocations (e.g., they could use HTTP-RPC, or a binary TCP protocol, or any other RPC-type mechanism).

public ref class OutOfProcessNodeInstance abstract : IDisposable, Microsoft::AspNetCore::NodeServices::HostingModels::INodeInstance
public abstract class OutOfProcessNodeInstance : IDisposable, Microsoft.AspNetCore.NodeServices.HostingModels.INodeInstance
[System.Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")]
public abstract class OutOfProcessNodeInstance : IDisposable, Microsoft.AspNetCore.NodeServices.HostingModels.INodeInstance
type OutOfProcessNodeInstance = class
    interface INodeInstance
    interface IDisposable
[<System.Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")>]
type OutOfProcessNodeInstance = class
    interface INodeInstance
    interface IDisposable
Public MustInherit Class OutOfProcessNodeInstance
Implements IDisposable, INodeInstance
Inheritance
OutOfProcessNodeInstance
Attributes
Implements

Constructors

OutOfProcessNodeInstance(String, String, String[], String, CancellationToken, ILogger, IDictionary<String,String>, Int32, Boolean, Int32)

Creates a new instance of OutOfProcessNodeInstance.

Fields

OutputLogger

The ILogger to which the Node.js instance's stdout/stderr is being redirected.

Methods

Dispose()

Disposes this instance.

Dispose(Boolean)

Disposes the instance.

Finalize()

Implements the finalization part of the IDisposable pattern by calling Dispose(false).

InvokeExportAsync<T>(CancellationToken, String, String, Object[])

Asynchronously invokes code in the Node.js instance.

InvokeExportAsync<T>(NodeInvocationInfo, CancellationToken)

Asynchronously invokes code in the Node.js instance.

OnErrorDataReceived(String)

Virtual method invoked whenever the Node.js process emits a line to its stderr.

OnOutputDataReceived(String)

Virtual method invoked whenever the Node.js process emits a line to its stdout.

PrepareNodeProcessStartInfo(String, String, String, IDictionary<String,String>, Boolean, Int32)

Configures a ProcessStartInfo instance describing how to launch the Node.js process.

Applies to

See also