示例#1
0
        protected override async Task OnCloseAsync(
            CancellationToken cancellationToken)
        {
            var payload = new StatefulServiceEventPayloadOnShutdown(false);

            await this.serviceEvents.NotifyShutdownAsync(payload, cancellationToken);
        }
示例#2
0
        protected override void OnAbort()
        {
            var payload = new StatefulServiceEventPayloadOnShutdown(false);

            this.serviceEvents.NotifyShutdownAsync(payload, default).GetAwaiter().GetResult();
        }