public Topic(TopicParentType topicParent, TopicType topicName, string subTopicName = "") { Topicparent = new TopicParent(topicParent); TopicName = topicName; TopicNameString = EnumClass.GetTopicTypeString(topicName); SubTopicList = new List <SubTopic>(); TopicParentMapping = new Dictionary <string, List <string> >(); PrepareSubTopicDictonary(); if (string.IsNullOrWhiteSpace(subTopicName)) { SubTopicSelected = SubTopicList.FirstOrDefault(); } else { SubTopicSelected = SubTopicList.Where(x => x.SubTopicDescription == subTopicName).FirstOrDefault(); } }
public static string GetTopicParentTypeString(TopicParentType topicType) { string topic = ""; switch (topicType) { case TopicParentType.DataStructures: topic = "Data Structures"; break; case TopicParentType.Others: topic = "Others"; break; default: break; } return(topic); }
public Topic GetTopicsList(TopicParentType topicParentType, TopicType topicType, string subTopicName = "") { var topic = new Topic(topicParentType, topicType, subTopicName); return(topic); }
public TopicParent(TopicParentType parentType) { ParentName = parentType; ParentNameString = EnumClass.GetTopicParentTypeString(ParentName); }