MarkMissing() public method

public MarkMissing ( string missing ) : void
missing string
return void
Ejemplo n.º 1
0
        private void validate(string template, IEnumerable <Cell> cells, List <string> keys)
        {
            var errors = new ParseErrors(template);

            keys.ForEach(key =>
            {
                if (cells.FirstOrDefault(c => c.Key == key) == null)
                {
                    errors.MarkExtra(key);
                }
            });

            foreach (Cell cell in cells)
            {
                if (!keys.Contains(cell.Key))
                {
                    if (cell.IsBooleanResult())
                    {
                        continue;
                    }

                    errors.MarkMissing(cell.Key);
                }
            }

            errors.ThrowIfErrors();
        }
Ejemplo n.º 2
0
        private void validate(string template, IEnumerable<Cell> cells, List<string> keys)
        {
            var errors = new ParseErrors(template);
            keys.ForEach(key =>
            {
                if (cells.FirstOrDefault(c => c.Key == key) == null)
                {
                    errors.MarkExtra(key);
                }
            });

            foreach (Cell cell in cells)
            {
                if (!keys.Contains(cell.Key))
                {
                    if (cell.IsBooleanResult()) continue;

                    errors.MarkMissing(cell.Key);
                }
            }

            errors.ThrowIfErrors();
        }