StorytellerDocGen.Transformation.LinkToTransformHandler.Transform C# (CSharp) Method

Transform() public method

public Transform ( Topic current, string data ) : string
current StorytellerDocGen.Topics.Topic
data string
return string
        public string Transform(Topic current, string data)
        {
            var props = data.Split(';');
            var key = props.First();

            

            try
            {
                var other = findOther(current, key);
                if (other == null) return string.Empty;

                return transformFromTopic(current, other, props);
            }
            catch (ArgumentOutOfRangeException)
            {
                var tag = new HtmlTag("p").AddClass("bg-warning").Style("padding", "5px");
                tag.Add("b").Text($"Unknown topic key '{key}'");
                tag.Add("small").Text(" -- CTRL+SHIFT+R to force refresh the topic tree");
                return tag.ToString();
            }
        }