views:

28

answers:

0

I am creating a class that can inherit properties from all its super-classes. That's all nice and standard but I have a unique problem of the lowest subclass needing to inherit from different superclasses that all inherit from the same superclass while only being able to inherit from one class depending on the current setup of the system.

... Confused?

Basically, my level 1 class has to inherit/instantiate a ONLY ONE level 2 class which will then inherit from the level 3.

public class QueryFormsBuilderStandard : QueryFormsBuilder"FormGroup"<DataItem, Validator, LogicValidator, ShowHelpDetails>

"FormGroup" is the level 2 class shown below

public class QueryFormsBuilderGroup1<DataItemType, ValidatorType, LogicValidatorType, ShowHelpDetailsType> :
                QueryFormsBuilderDynamic<DataItemType, ValidatorType, LogicValidatorType, ShowHelpDetailsType>, IFormBase
                where DataItemType : IDataItem, new()
                where ValidatorType : IValidate<DataItemType>, new()
                where LogicValidatorType : ILogicValidator, new()

I need something like that but more in the range of :

public class QueryFormsBuilderStandard<QueryFormBuilder> : QueryFormBuilder<DataItem, ValidatorNCIC, LogicValidator, ShowHelpDetails>

where QueryFormBuilder will allow me to pass in the class required for this current setup.