Ejemplo n.º 1
0
        public ReadResults Parse(IStringReader reader, DispatcherResources resources, out HashSet <char> result)
        {
            result = new HashSet <char>();
            int start = reader.GetCursor();

            while (!reader.AtEndOfArgument())
            {
                char c = reader.Read();
                if (!Characters.Contains(c) || result.Contains(c))
                {
                    reader.SetCursor(start);
                    return(ReadResults.Failure(CommandError.InvalidSwizzle(Characters).WithContext(reader)));
                }
                result.Add(c);
            }
            return(ReadResults.Success());
        }