StorytellerDocGen.Topics.TopicLoader.LoadTopic C# (CSharp) Method

LoadTopic() public static method

public static LoadTopic ( string file, bool isRoot ) : Topic
file string
isRoot bool
return Topic
        public static Topic LoadTopic(string file, bool isRoot)
        {
            Debug.WriteLine("Loading topic file " + file.ToFullPath());
            if (!File.Exists(file))
            {
                throw new FileNotFoundException("No topic file", file);
            }

            var key = Path.GetFileNameWithoutExtension(file).EqualsIgnoreCase("splash") ? "index" : Path.GetFileNameWithoutExtension(file);

            var topic = new Topic(key.ToLower(), file);

            return topic;
        }