public static MessagePath <TMessage> AddMessagePath(IMessageHub dispatcher, Type location, string description, LogEnum logType, Action <TMessage> path, Guid pathId, int viaLimit = -1) { if (path == null) { throw new ArgumentNullException(nameof(path)); } MessagePath <TMessage> handler = new MessagePath <TMessage>(location, description, logType, path, pathId, viaLimit); dispatcher.AddMessagePath(handler); return(handler); }
public static MessagePath <TMessage> AddMessagePath(IMessageHub hub, Type location, string description, LogEnum logType, Action <TMessage> action, PathId pathId, int viaTimesLimit = -1) { if (action == null) { throw new ArgumentNullException(nameof(action)); } MessagePath <TMessage> path = new MessagePath <TMessage>(location, description, logType, action, pathId, viaTimesLimit); hub.AddMessagePath(path); return(path); }