I'm a bit fuzzy on the new Action/Func/Variance/CoVariance stuff, which is probably what I need.
What I want is to be able to pass a delegate as a parameter to a method, that takes a string and returns a bool. The problem is that I can't use a typed delegate or interface since it will be used in different libraries which doesn't share libraries, and both will be invoked by a third.
So in general I want the delegate to be inferred by it's input and returning type.
So it'll be like:
delegate bool IncludeItemDelegate(string item);
ClassA.FetchItems(int someParameter,includeItemDelegate);
ClassB.FetchItems(int someParameter,string someOtherParam,includeItemDelegate);
Where A and B doesnt share any libraries, can it be done?