Class MorpheoNode
Main hosted service representing a Morpheo Node. Manages the lifecycle of the web server and network discovery interactions.
Implements
Inherited Members
Namespace: Morpheo.Core
Assembly: Morpheo.Core.dll
Syntax
public class MorpheoNode : IHostedService
Constructors
| Edit this page View SourceMorpheoNode(MorpheoOptions, INetworkDiscovery, IMorpheoServer, ILogger<MorpheoNode>)
Declaration
public MorpheoNode(MorpheoOptions options, INetworkDiscovery discovery, IMorpheoServer server, ILogger<MorpheoNode> logger)
Parameters
| Type | Name | Description |
|---|---|---|
| MorpheoOptions | options | |
| INetworkDiscovery | discovery | |
| IMorpheoServer | server | |
| ILogger<MorpheoNode> | logger |
Methods
| Edit this page View SourceStartAsync(CancellationToken)
Triggered when the application host is ready to start the service.
Declaration
public Task StartAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | Indicates that the start process has been aborted. |
Returns
| Type | Description |
|---|---|
| Task | A Task that represents the asynchronous Start operation. |
StopAsync(CancellationToken)
Triggered when the application host is performing a graceful shutdown.
Declaration
public Task StopAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | Indicates that the shutdown process should no longer be graceful. |
Returns
| Type | Description |
|---|---|
| Task | A Task that represents the asynchronous Stop operation. |