StorytellerDocGen.Topics.Topic.PrependKey C# (CSharp) Method

PrependKey() public method

public PrependKey ( string key ) : void
key string
return void
        public void PrependKey(string key)
        {
            if (IsIndex)
            {
                Key = key;
                if (Title == "Index")
                {
                    Title = KeyWithinParent.Capitalize();
                }
            }
            else
            {
                Key = key + "/" + Key;
            }

            _children.Each(x => x.PrependKey(key));
        }

Usage Example

コード例 #1
0
        public void AddChild(Topic topic)
        {
            topic.Parent = this;
            _children.Add(topic);

            if (!IsIndex)
            {
                topic.PrependKey(Key);
            }
        }
All Usage Examples Of StorytellerDocGen.Topics.Topic::PrependKey