public async Task OnSMStarting() { try { if (OnSMStartingEvent != null) { await OnSMStartingEvent.InvokeAsync(this, new SMEventArgs(_sm)).ConfigureAwait(false); } } catch (Exception ex) { LogTo.Error(ex, "Exception while notifying starting"); throw; } }
public async Task OnSMStartingAsync() { try { if (OnSMStartingInternalEvent != null) { await OnSMStartingInternalEvent.InvokeAsync(this, new SMEventArgs(_sm)).ConfigureAwait(false); } OnSMStartingEvent?.InvokeRemote( nameof(OnSMStartingEvent), h => OnSMStartingEvent -= h ); } catch (Exception ex) { LogTo.Error(ex, "Exception while notifying subscribers of OnSMStarting"); throw; } }