Class ArcApplication
- Namespace
- Cratis.Arc
- Assembly
- Cratis.Arc.Core.dll
Represents an Arc application.
public class ArcApplication : IHost, IDisposable, IAsyncDisposable
- Inheritance
-
ArcApplication
- Implements
- Inherited Members
- Extension Methods
Constructors
ArcApplication(IHost, ArcOptions)
Initializes a new instance of the ArcApplication class.
public ArcApplication(IHost host, ArcOptions options)
Parameters
hostIHostThe underlying IHost.
optionsArcOptionsThe ArcOptions.
Properties
Options
Gets the options for this Arc application.
public ArcOptions Options { get; }
Property Value
Services
Gets the services configured for the program (for example, using ConfigureServices(Action<HostBuilderContext, IServiceCollection>)).
public IServiceProvider Services { get; }
Property Value
Methods
CreateBuilder(string[]?)
Creates a new instance of the ArcApplicationBuilder.
public static ArcApplicationBuilder CreateBuilder(string[]? args = null)
Parameters
argsstring[]Command line arguments.
Returns
- ArcApplicationBuilder
A new instance of the ArcApplicationBuilder.
Dispose()
public void Dispose()
DisposeAsync()
public ValueTask DisposeAsync()
Returns
StartAsync(CancellationToken)
Starts the IHostedService objects configured for the program. The application will run until interrupted or until StopApplication() is called.
public Task StartAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenUsed to abort program start.
Returns
StopAsync(CancellationToken)
Attempts to gracefully stop the program.
public Task StopAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenUsed to indicate when stop should no longer be graceful.