![]() I am thinking that generics is the way to go - but - the problem is that if I query off of the overall hierarchical collection, or rather, if I filter on it, when I am recursively going through each child's children collection (i.e. (7) NodeResult - implements INodeResult - I don't need/want a children property in this class, but, I am willing to have an empty collection hang off of the class if the overall hierarchy can be structured properly.Įssentially, I want one base type for node - and the assumption should be that a node can contain other nodes. (6) INodeResult - derives from INodeBase. The implementation of the Children property should allow it to contain items of the NodeResult type. The implementation of the Children property should allow it to contain items of both the INodeFolder type and INodeItem type. (2) INodeFolder - derives from INodeBase. (1) INodeBase - contains a Children property that is a Collection of itself (INodeBase) I want to create a hierarchical structure that will closely follow the following structure:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |