I am trying to create a class that uses two levels of inheritance as such:
public class QuickDateTokenParcer<TQuickDateRelative, TUserInputOrderAdjustment>
where TQuickDateRelative : AbstractQuickDateRelative<TUserInputOrderAdjustment>, new()
where TUserInputOrderAdjustment : AbstractUserInputOrderAdjustment, new()
This would be OK except I really do not like specifying it like:
var dic = new QuickDateTokenParcer<QuickDateRelativePast
<UserInputOrderAdjustmentMdy>, UserInputOrderAdjustmentMdy>(
"QuickDateStrings.xml", DateTime.Now);
I can obviously get around this, but would like be able to do the following:
var dic = new QuickDateTokenParcer<QuickDateRelativePast
<UserInputOrderAdjustmentMdy>>(
"QuickDateStrings.xml", DateTime.Now);
or the following
var dic = new QuickDateTokenParcer<QuickDateRelativePast,
UserInputOrderAdjustmentMdy>(
"QuickDateStrings.xml", DateTime.Now);