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); }
/// <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; } }
/// <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)); } } }
/// <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)); }
public override SummaryBase Combine(SummaryBase other) { return(Combine((DistinctInt32CountSummary)other)); }
/// <override/> public override SummaryBase Combine(SummaryBase other) { return(Combine((StatisticsSummary)other)); }
/// <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)); }
public PivotComputationInfo(SummaryBase summary, string calculationName, string description, string fieldName) { Initialize(summary, calculationName, description, fieldName); }
/// <override/> public override SummaryBase Combine(SummaryBase other) { return(Combine((DoubleStdDevSummary)other)); }
/// <summary> /// Removes an object instance from the current collection set of items. /// </summary> public virtual void Remove(SummaryBase summaryBase) { InnerRemove(summaryBase); }
/// <summary> /// Adds a new object instance to the current collection set. /// </summary> public virtual int Add(SummaryBase summaryBase) { return InnerAdd(summaryBase); }