Пример #1
0
        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();
            }
        }
Пример #2
0
        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);
        }
Пример #3
0
        public Topic GetTopicsList(TopicParentType topicParentType, TopicType topicType, string subTopicName = "")
        {
            var topic = new Topic(topicParentType, topicType, subTopicName);

            return(topic);
        }
Пример #4
0
 public TopicParent(TopicParentType parentType)
 {
     ParentName       = parentType;
     ParentNameString = EnumClass.GetTopicParentTypeString(ParentName);
 }