Beispiel #1
0
        public static Cell For(CellHandling cells, PropertyInfo property, Fixture fixture)
        {
            var cell = new Cell(cells, property.Name, property.PropertyType);

            property.ForAttribute <ModifyCellAttribute>(x => x.Modify(cell));

            cell.ReadLists(cells, fixture);

            return(cell);
        }
Beispiel #2
0
        public static Cell For(CellHandling cells, Accessor accessor, Fixture fixture)
        {
            var cell = new Cell(cells, accessor.Name, accessor.PropertyType);

            accessor.ForAttribute <ModifyCellAttribute>(x => x.Modify(cell));

            cell.ReadLists(cells, fixture);

            return(cell);
        }
Beispiel #3
0
        public static Cell For(CellHandling cells, ParameterInfo parameter, Fixture fixture)
        {
            bool isOutput = false;
            var  type     = parameter.ParameterType;

            if (parameter.IsOut)
            {
                type     = type.GetElementType();
                isOutput = true;
            }

            var cell = new Cell(cells, parameter.Name, type)
            {
                output = isOutput, Position = parameter.Position
            };

            parameter.ForAttribute <ModifyCellAttribute>(x => x.Modify(cell));

            if (parameter.HasDefaultValue)
            {
                if (parameter.DefaultValue != null)
                {
                    cell.DefaultValue = parameter.DefaultValue.ToString();
                }
                else
                {
                    cell.DefaultValue = "NULL";
                }
            }



            cell.ReadLists(cells, fixture);

            return(cell);
        }