protected override async Task OnCloseAsync( CancellationToken cancellationToken) { var payload = new StatefulServiceEventPayloadOnShutdown(false); await this.serviceEvents.NotifyShutdownAsync(payload, cancellationToken); }
protected override void OnAbort() { var payload = new StatefulServiceEventPayloadOnShutdown(false); this.serviceEvents.NotifyShutdownAsync(payload, default).GetAwaiter().GetResult(); }