Show / Hide Table of Contents

Class DefaultAppShutdownAwaiter

A default application shutdown awaiter.

Inheritance
System.Object
DefaultAppShutdownAwaiter
ConsoleAppShutdownAwaiter
Implements
IAppShutdownAwaiter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Application
Assembly: Kephas.Application.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultAppShutdownAwaiter : IAppShutdownAwaiter

Constructors

| Improve this Doc View Source

DefaultAppShutdownAwaiter(IEventHub)

Initializes a new instance of the DefaultAppShutdownAwaiter class.

Declaration
public DefaultAppShutdownAwaiter(IEventHub eventHub)
Parameters
Type Name Description
IEventHub eventHub

The event hub.

Properties

| Improve this Doc View Source

IsAttended

Gets or sets a value indicating whether the application is attended/interactive.

Declaration
public bool IsAttended { get; protected set; }
Property Value
Type Description
System.Boolean

True if the application is attended/interactive, false if not.

Methods

| Improve this Doc View Source

GetAttendedResult()

Gets the attended result.

Declaration
protected virtual IOperationResult GetAttendedResult()
Returns
Type Description
IOperationResult

The attended result.

| Improve this Doc View Source

GetUnattendedResult()

Gets the unattended result.

Declaration
protected virtual IOperationResult GetUnattendedResult()
Returns
Type Description
IOperationResult

The unattended result.

| Improve this Doc View Source

HandleShutdownSignal()

Handles the shutdown signal.

Declaration
protected virtual void HandleShutdownSignal()
| Improve this Doc View Source

RunAttendedAsync(CancellationToken)

Executes the attended asynchronous operation.

Declaration
protected virtual Task RunAttendedAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

A token that allows processing to be cancelled.

Returns
Type Description
System.Threading.Tasks.Task

An asynchronous result.

| Improve this Doc View Source

RunUnattendedAsync(CancellationToken)

Executes the unattended asynchronous operation.

Declaration
protected virtual Task RunUnattendedAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

A token that allows processing to be cancelled.

Returns
Type Description
System.Threading.Tasks.Task

An asynchronous result.

| Improve this Doc View Source

WaitForShutdownSignalAsync(CancellationToken)

Waits for the shutdown signal asynchronously.

Declaration
public Task<(IOperationResult result, AppShutdownInstruction instruction)> WaitForShutdownSignalAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

Optional. A token that allows processing to be cancelled.

Returns
Type Description
System.Threading.Tasks.Task<System.ValueTuple<IOperationResult, AppShutdownInstruction>>

An asynchronous result that yields the shutdown result.

Implements

IAppShutdownAwaiter

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX