Example #1
0
 private new EventHandlerFactoryList GetOrCreateHandlerFactories(Type eventType)
 {
     return HandlerFactories.GetOrAdd(eventType, (type) =>
     {
         var eventName = EventNameAttribute.GetNameOrDefault(type);
         EventTypes[eventName] = type;
         return new EventHandlerFactoryList();
     }) as EventHandlerFactoryList;
 }
 private List <IEventHandlerFactory> GetOrCreateHandlerFactories(Type eventType)
 {
     return(HandlerFactories.GetOrAdd(
                eventType,
                type => {
         var eventName = EventNameAttribute.GetNameOrDefault(type);
         EventTypes[eventName] = type;
         return new List <IEventHandlerFactory> ();
     }
                ));
 }
Example #3
0
 private List <IEventHandlerFactory> GetOrCreateHandlerFactories(Type eventType)
 {
     return(HandlerFactories.GetOrAdd(
                eventType,
                type =>
     {
         var eventName = EventNameAttribute.GetNameOrDefault(type);
         EventStopingTokens[eventName] = new CancellationTokenSource();
         return new List <IEventHandlerFactory>();
     }
                ));
 }
Example #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="eventType"></param>
 /// <returns></returns>
 protected List <IEventHandlerFactory> GetOrCreateHandlerFactories(Type eventType) => HandlerFactories.GetOrAdd(eventType, (type) => new List <IEventHandlerFactory>());
Example #5
0
 private List <IEventHandlerFactory> GetOrCreateHandlerFactories(Type eventType)
 {
     return(HandlerFactories.GetOrAdd(eventType, (type) => new List <IEventHandlerFactory>()));
 }