Base class for calculation settings. Holds the input to a calculation and uses it to determine when the calculation needs to be rerun,
invalidated etc. This class must be extended to implement a specialized settings class that is suited for a concrete calculations implementation.
Inheritance Hierarchy
Spotfire.Dxp.Framework.DocumentModel Node
Spotfire.Dxp.Framework.DocumentModel DocumentNode
Spotfire.Dxp.Application.Calculations CalculationSettings
Spotfire.Dxp.Application.Calculations.DataRelationships DataRelationshipsCalculationSettings
Namespace: Spotfire.Dxp.Application.Calculations
Assembly: Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 14.10.7525.5058 (14.10.7525.5058)
Syntax
Remarks
Examples
internal class MyCalculationSettings : CalculationSettings { #region Classes for property names public new abstract class PropertyNames : CalculationSettings.PropertyNames { //empty } #endregion // Classes for property names #region Classes for calculation dependency identifiers public new abstract class CalculationDependencyIdentifiers : CalculationSettings.CalculationDependencyIdentifiers { internal static readonly CalculationDependencyIdentifier XColumns = CreateIdentifier("XColumns"); internal static readonly CalculationDependencyIdentifier YColumns = CreateIdentifier("YColumns"); internal static readonly CalculationDependencyIdentifier DataFilteringSelection = CreateIdentifier("DataFilteringSelection"); } #endregion #region Properties public override CalculationUpdateBehavior UpdateBehavior { get { return CalculationUpdateBehavior.Invalidate; } } public DataTable XColumnsSourceDataTable { get { DataColumnCalculationDependencyCollection dep = GetColumnDependencies(CalculationDependencyIdentifiers.XColumns); if (dep != null) { //unlike asking the columns for their ancestor table this will always work even if the user has deleted all columns //in the table and is thus preferable return dep.DataTable; } return null; } } public IEnumerable<DataColumn> XColumns { get { DataColumnCalculationDependencyCollection dep = GetColumnDependencies(CalculationDependencyIdentifiers.XColumns); if (dep != null) { return dep.Columns; } return new List<DataColumn>(); } set { AddDependency(CalculationDependencyIdentifiers.XColumns, value); } } public IEnumerable<DataColumn> YColumns { get { DataColumnCalculationDependencyCollection dep = GetColumnDependencies(CalculationDependencyIdentifiers.YColumns); if (dep != null) { return dep.Columns; } return new List<DataColumn>(); } set { AddDependency(CalculationDependencyIdentifiers.YColumns, value); } } //the steps for a dependency on marking are exactly the same public DataFilteringSelection DataFilteringSelection { get { DataSelectionCalculationDependency dep = GetDataSelectionDependency(CalculationDependencyIdentifiers.DataFilteringSelection); if(dep!=null) { return dep.DataSelection; } return null; } set { AddDependency(CalculationDependencyIdentifiers.DataFilteringSelection, value); } } #endregion #region Construction public MyCalculationSettings() { } #endregion #region ISerializable Members protected MyCalculationSettings(SerializationInfo info, StreamingContext context) : base(info, context) { } protected override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); } #endregion }
Version Information
See Also