Пример #1
0
 public void Trigger(TEvent evt)
 {
     if (_handleEvents != null && _handleEvents.Any())
     {
         _taskFactory.StartTask(() =>
         {
             if (_container.GetCurrentLifetimeScope() != null)
             {
                 _factory().Trigger(evt);
             }
             else
             {
                 using (_container.BeginLifetimeScope())
                 {
                     _factory().Trigger(evt);
                 }
             }
         });
     }
 }