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> (); } )); }
private List <IEventHandlerFactory> GetOrCreateHandlerFactories(Type eventType) { return(HandlerFactories.GetOrAdd( eventType, type => { var eventName = EventNameAttribute.GetNameOrDefault(type); EventStopingTokens[eventName] = new CancellationTokenSource(); return new List <IEventHandlerFactory>(); } )); }
/// <summary> /// /// </summary> /// <param name="eventType"></param> /// <returns></returns> protected List <IEventHandlerFactory> GetOrCreateHandlerFactories(Type eventType) => HandlerFactories.GetOrAdd(eventType, (type) => new List <IEventHandlerFactory>());
private List <IEventHandlerFactory> GetOrCreateHandlerFactories(Type eventType) { return(HandlerFactories.GetOrAdd(eventType, (type) => new List <IEventHandlerFactory>())); }