How can I change the signature of my Action delegates to NOT use void methods in my Dictionary<bool, Action<UrlParts, List<UrlParts>>>?
public static Func<UrlParts, List<UrlParts>, bool> LacksDomainPage = (up, lup) => !lup.Contains(up);
public static Action<UrlParts, List<UrlParts>> LacksUrl = (up, lup) => dicAddDomainPage[LacksDomainPage(up, lup)](up, lup);
public static Dictionary<bool, Action<UrlParts, List<UrlParts>>> dicAddDomainPage
= new Dictionary<bool, Action<UrlParts, List<UrlParts>>>() { { true, AddDomainPage }, { false, AddNothing }, };
using
public static Action<UrlParts, List<UrlParts>> AddDomainPage = (up, ldp) => ldp.Add(up);
public static Action<UrlParts, List<UrlParts>> AddNothing = (up, ldp) => { };
instead of
public static void AddDomainPage(UrlParts up, List<UrlParts> ldp)
{
ldp.Add(up);
}
public static void AddNothing(UrlParts up, List<UrlParts> ldp) { }