public async Task OnSMStarted() { try { await SaveConfig(false).ConfigureAwait(false); SMAUI.Initialize(); if (OnSMStartedEvent != null) { await OnSMStartedEvent.InvokeAsync( this, new SMProcessArgs(_sm, SMProcess.Native)).ConfigureAwait(false); } } catch (Exception ex) { LogTo.Error(ex, "Exception while notifying started"); throw; } }
public async Task OnSMStartedAsync() { try { await SaveConfigAsync().ConfigureAwait(false); if (OnSMStartedInternalEvent != null) { await OnSMStartedInternalEvent.InvokeAsync( this, new SMProcessEventArgs(_sm, SMProcess.Native)).ConfigureAwait(false); } OnSMStartedEvent?.InvokeRemote( nameof(OnSMStartingEvent), h => OnSMStartingEvent -= h ); } catch (Exception ex) { LogTo.Error(ex, "Exception while notifying subscribers of OnSMStarted"); throw; } }