Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
        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;
            }
        }