CubeIsland.LyricsReloaded.Filters.FilterCollection.readFilterArgs C# (CSharp) Method

readFilterArgs() private static method

private static readFilterArgs ( IEnumerator it ) : string[]
it IEnumerator
return string[]
        private static string[] readFilterArgs(IEnumerator<YamlNode> it)
        {
            LinkedList<string> args = new LinkedList<string>();

            YamlNode node;
            while (it.MoveNext())
            {
                node = it.Current;
                if (!(node is YamlScalarNode))
                {
                    throw new InvalidConfigurationException("Filter args may only be strings!");
                }
                args.AddLast(((YamlScalarNode)node).Value);
            }

            string[] argArray = new string[args.Count];
            if (argArray.Length == 0)
            {
                return argArray;
            }

            args.CopyTo(argArray, 0);
            return argArray;
        }