Ejemplo n.º 1
0
        public static SummaryBase CreateSummary(string computationName)
        {
            SummaryBase summary = null;

            switch (computationName)
            {
            case "Average":
            case "Minimum":
            case "Maximum":
            case "Sum":
                summary = DoubleAggregateSummary.Empty;
                break;

            case "Median":
            case "Percentile25":
            case "Percentile75":
                summary = DoubleVectorSummary.Empty;
                break;

            case "Count":
                summary = CountSummary.Empty;
                break;

            case "StdDev":
            case "StdDevP":
            case "Var":
            case "VarP":
                summary = DoubleStdDevSummary.Empty;
                break;

            default:
                break;
            }
            return(summary);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This method is used to combine the summary values of caluculation item.
        /// </summary>
        /// <param name="other">The object.</param>
        public override void CombineSummary(SummaryBase other)
        {
            MyCustomSummaryBase1 dpsb = other as MyCustomSummaryBase1;

            if (null != dpsb)
            {
                mTotalValue += dpsb.mTotalValue;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes the computation definition. This method must be called to define the computation.
        /// </summary>
        /// <param name="summary">The SummaryBa</param>
        /// <param name="displayPropertyName"></param>
        /// <param name="description"></param>
        /// <param name="name"></param>
        public void Initialize(SummaryBase summary, string calculationName, string description, string fieldName)
        {
            this.summary = summary;

            this.calculationName = calculationName;
            this.description     = description;
            this.fieldName       = fieldName;
            this.pd = null;


            if (summary != null)
            {
                PropertyDescriptorCollection pdc = TypeDescriptor.GetProperties(summary, new Attribute[] { new BrowsableAttribute(true) });
                try
                {
                    pd = pdc[calculationName];
                }
                catch
                {
                    MessageBox.Show(string.Format("{0} not a valid summary property (case matters)", calculationName));
                }
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Combines this summary information with another objects summary and returns a new object.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 /// <remarks>
 /// This method must honor the immutable characteristics of summary objects and return
 /// a new summary object instead of modifying an existing summary object.
 /// </remarks>
 public override SummaryBase Combine(SummaryBase other)
 {
     return(Combine((TotalSummary)other));
 }
Ejemplo n.º 5
0
 public override SummaryBase Combine(SummaryBase other)
 {
     return(Combine((DistinctInt32CountSummary)other));
 }
Ejemplo n.º 6
0
 /// <override/>
 public override SummaryBase Combine(SummaryBase other)
 {
     return(Combine((StatisticsSummary)other));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Combines this summary information with another objects summary and returns a new object.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 /// <remarks>
 /// This method must honor the immutable characteristics of summary objects and return
 /// a new summary object instead of modifying an existing summary object.
 /// </remarks>
 public override SummaryBase Combine(SummaryBase other)
 {
     return(Combine((WeightedSummary)other));
 }
Ejemplo n.º 8
0
 public PivotComputationInfo(SummaryBase summary, string calculationName, string description, string fieldName)
 {
     Initialize(summary, calculationName, description, fieldName);
 }
Ejemplo n.º 9
0
 /// <override/>
 public override SummaryBase Combine(SummaryBase other)
 {
     return(Combine((DoubleStdDevSummary)other));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Removes an object instance from the current collection set of items.
 /// </summary>
 public virtual void Remove(SummaryBase summaryBase)
 {
     InnerRemove(summaryBase);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Adds a new object instance to the current collection set.
 /// </summary>
 public virtual int Add(SummaryBase summaryBase)
 {
     return InnerAdd(summaryBase);
 }