PdfRpt.DataAnnotations.CustomAggregateFunctionAttribute.CustomAggregateFunctionAttribute C# (CSharp) Method

CustomAggregateFunctionAttribute() public method

Defining how a property of MainTableDataSource should be rendered as a column's cell.
public CustomAggregateFunctionAttribute ( Type aggregateFunctionType ) : System
aggregateFunctionType System.Type A typeof(IAggregateFunction) value, such as typeof(Sum).
return System
        public CustomAggregateFunctionAttribute(Type aggregateFunctionType)
        {
            if (aggregateFunctionType == null)
                throw new ArgumentNullException("aggregateFunctionType");

            if (!aggregateFunctionType.GetInterfaces().Contains(typeof(IAggregateFunction)))
                throw new ArgumentException("The aggregateFunctionType Type must typeof(IAggregateFunction).", "aggregateFunctionType");

            if (aggregateFunctionType.GetConstructor(Type.EmptyTypes) == null)
                throw new ArgumentException("The aggregateFunctionType type must declare a public parameterless consructor.", "aggregateFunctionType");

            AggregateFunctionType = aggregateFunctionType;
        }
CustomAggregateFunctionAttribute