/// <summary> /// Remove a specific entity type and the types derived from that entity type. /// </summary> /// <typeparam name="TEntity">Type of the entity</typeparam> public static void Remove <TEntity>([NotNull] this IAutoEntityDistributedEventSelectorList selectors) where TEntity : IEntity { Check.NotNull(selectors, nameof(selectors)); var selectorName = "Entity:" + typeof(TEntity).FullName; selectors.RemoveAll(s => s.Name == selectorName); }
public static bool RemoveByName( [NotNull] this IAutoEntityDistributedEventSelectorList selectors, [NotNull] string name) { Check.NotNull(selectors, nameof(selectors)); Check.NotNull(name, nameof(name)); return(selectors.RemoveAll(s => s.Name == name).Count > 0); }