Ejemplo n.º 1
0
        public override IList <Cell> GetCells()
        {
            var keys = DisplayParser.GetKeys(Template);

            return(_inner.GetCells().Where(cell =>
            {
                if (keys.Contains(cell.Key))
                {
                    return true;
                }

                if (_defaults.ContainsKey(cell.Key))
                {
                    return false;
                }

                return !cell.HasDefault();
            }).ToList());
        }
Ejemplo n.º 2
0
        public ValueCheckMethod(MethodInfo method, object target)
            : base(method, target)
        {
            Cell[] argumentCells = _method.GetArgumentCells();
            Cell   returnCell    = _method.GetReturnCell();

            _cells = new List <Cell>(argumentCells)
            {
                returnCell
            };

            var keys = DisplayParser.GetKeys(Template).ToList();

            var argKeys = argumentCells.Select(x => x.Key);

            keys.RemoveAll(key => argKeys.Contains(key));

            if (keys.Count == 1)
            {
                returnCell.Key = keys[0];
            }
        }