BatchFlow.Flow.FromAsciiArt C# (CSharp) Method

FromAsciiArt() public static method

public static FromAsciiArt ( string art ) : Flow
art string
return Flow
        public static Flow FromAsciiArt(string art, params TaskNode[] nodes)
        {
            Dictionary<char, TaskNode> dict = new Dictionary<char, TaskNode>();
            var chars = art.ToCharArray().Where((char c) => c>='a' && c<='z').OrderBy(c => c).ToList<char>();
            if (chars.Count() != nodes.Length)
            {
                throw new ArgumentException("The list of nodes contains the wrong number of items. Ir should match the number of different letters in the ASCII art representation");
            }
            for (int i = 0; i < chars.Count(); i++)
            {
                dict.Add(chars[i], nodes[i]);
            }
            return FromAsciiArt(art, dict);
        }

Same methods

Flow::FromAsciiArt ( string art, TaskNode>.IDictionary nodes ) : Flow