Class FireflyService
public abstract class FireflyService : IFireflyService, IHost, IDisposable, IFireflyServiceEfCoreExtensions
- Inheritance
-
objectFireflyService
- Implements
- Derived
Constructors
FireflyService()
public FireflyService()
Properties
AppCacheService
public IAppCacheService AppCacheService { get; }
Property Value
AppFeatureFlags
public IAppFeatureFlagsService AppFeatureFlags { get; }
Property Value
AppJobService
public IAppJobService AppJobService { get; }
Property Value
AppMutexService
public IAppMutexService AppMutexService { get; }
Property Value
AppStateMachineService
public IAppStateMachineService AppStateMachineService { get; }
Property Value
Configuration
public IConfiguration Configuration { get; }
Property Value
DataPath
Persistent storage directory for the service. (contents will persist across new deployments of the service) The Data directory is a local directory and it's contents are unique to the machine the service runs on.
public string DataPath { get; }
Property Value
DeploymentDirectoryPath
The directory where service files are deployed
public string DeploymentDirectoryPath { get; }
Property Value
EnvironmentName
public string EnvironmentName { get; }
Property Value
HostingEnvironment
public IHostEnvironment HostingEnvironment { get; }
Property Value
Info
public InfoContainer Info { get; }
Property Value
IsRunning
public bool IsRunning { get; }
Property Value
QuantumSpaceDataProtectionProvider
A QuantumSpace-wide data protector. All services in the same QuantumSpace will use the same key
public IFireflyDataProtectionProvider QuantumSpaceDataProtectionProvider { get; }
Property Value
ServiceDataProtectionProvider
A Service-wide data protector. All replicas of this service in the same QuantumSpace will use the same key
public IFireflyDataProtectionProvider ServiceDataProtectionProvider { get; }
Property Value
ServiceName
public string ServiceName { get; }
Property Value
ServiceTags
public IServiceTagManager ServiceTags { get; }
Property Value
Services
Gets the services configured for the program (for example, using HostBuilder.ConfigureServices(Action
public IServiceProvider Services { get; }
Property Value
State
public FireflyServiceStates State { get; }
Property Value
logger
protected ILogger logger { get; }
Property Value
Methods
BuildServiceProvider(IServiceCollection)
protected virtual IServiceProvider BuildServiceProvider(IServiceCollection services)
Parameters
services
IServiceCollection
Returns
ConfigurationBuilder(IConfigurationBuilder)
Configure service-wide configurations/setting loading and handling
protected virtual void ConfigurationBuilder(IConfigurationBuilder configBuilder)
Parameters
configBuilder
IConfigurationBuilder
Configure(IGlowApplicationBuilder)
Configure middleware
protected virtual void Configure(IGlowApplicationBuilder app)
Parameters
ConfigureHost(IHostBuilder)
protected virtual void ConfigureHost(IHostBuilder hostBuilder)
Parameters
hostBuilder
IHostBuilder
ConfigureInterop(IGlowApplicationInteropBuilder)
Configure interop middleware
protected virtual void ConfigureInterop(IGlowApplicationInteropBuilder app)
Parameters
ConfigureLogging(ILoggingBuilder)
Configure logging
protected virtual void ConfigureLogging(ILoggingBuilder loggingBuilder)
Parameters
loggingBuilder
ILoggingBuilder
ConfigureServices(IServiceCollection)
Configure Dependency-Injected services
protected virtual void ConfigureServices(IServiceCollection services)
Parameters
services
IServiceCollection
ConfigureServicesAsync(IServiceCollection)
Configure Dependency-Injected services (async)
protected virtual Task ConfigureServicesAsync(IServiceCollection services)
Parameters
services
IServiceCollection
Returns
ConfigureWebHostBuilder(IWebHostBuilderProxy)
Configure ASP.Net enabled libraries that use IWebHostBuilder. You need Phoesion.Glow.SDK.AspAdapter package to get an IWebHostBuilder from the IWebHostBuilderProxy using builder.AsAsp()
protected virtual void ConfigureWebHostBuilder(IWebHostBuilderProxy builder)
Parameters
builder
IWebHostBuilderProxy
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetDBContexts(string[])
protected virtual IEnumerable<object> GetDBContexts(string[] args)
Parameters
args
string[]
Returns
- IEnumerable<object>
Initialize()
protected virtual void Initialize()
OnHoldingMode()
A new version has been deployed and the current version is set in holding mode (a short time before it starts shutdown)
protected virtual Task OnHoldingMode()
Returns
OnStartAsync(CancellationToken)
OnStartAsync() will be invoked after initialization but before starting to handle requests
protected virtual Task OnStartAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken
Returns
Remarks
at this point, HostedServices have been started.
OnStartedAsync(CancellationToken)
OnStartedAsync() will be invoked after full initialization is successfully completed
protected virtual Task OnStartedAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken
Returns
Remarks
at this point, HostedServices have been started.
OnStartingAsync(CancellationToken)
OnStartingAsync() will be invoked after initialization but before starting HostedServices
protected virtual Task OnStartingAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken
Returns
OnStopAsync(CancellationToken)
Will be invoked during service shutdown
protected virtual Task OnStopAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken
Returns
OnStoppedAsync(CancellationToken)
Will be invoked after service shutdown completed
protected virtual Task OnStoppedAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken
Returns
OnStoppingAsync(CancellationToken)
Will be invoked before service shutdown
protected virtual Task OnStoppingAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken
Returns
ReportIncident(IncidentTypes, string, string, object, bool)
public Task<bool> ReportIncident(IncidentTypes type, string title, string description, object data, bool IsEntitySpecific = false)
Parameters
type
IncidentTypestitle
stringdescription
stringdata
objectIsEntitySpecific
bool