Ejemplo n.º 1
0
 public MolapAggregationsStorage(T cubeid, StorageConfig config, MolapCellValuesHelper <T, U> cellValuesHelper, CanonicFormater <T> canonicFormater)
 {
     _rootCubeid        = cubeid;
     _config            = config;
     _cellValuesHelper  = cellValuesHelper;
     _canonicFormater   = canonicFormater;
     _keyHandler        = new MolapKeyHandler <T>(config.MolapConfig);
     _aggregationGraphs = new TSDictionary <T, Graph <T, U> >();
 }
Ejemplo n.º 2
0
        private void Init()
        {
            this.NameSpace  = new ImpNameSpace(AbsIdentityKey <T> .Create());
            this.Dimensions = new MembersCollection <Dimension <T> >(
                ItemType.Dimension,
                (dimension) =>
            {
                this.NameSpace.Add(dimension);

                if (dimension.TypeOf == DimensionType.Date)
                {
                    //todo change this
                    ((DimensionDateTime <T>)dimension).SetMembersStorage(new DimensionMembersCollection());
                }
                else
                {
                    dimension.SetMembersStorage(new DimensionMembersCollection());
                }
            },
                (storage) =>
            {
                this.NameSpace.Clear(ItemType.Dimension);

                foreach (Dimension <T> item in storage)
                {
                    item.Dispose();
                }
            });
            this.Measures = new MembersCollection <Measure <T> >(
                ItemType.Measure,
                (measure) => { this.NameSpace.Add(measure); },
                (storage) => this.NameSpace.Clear(ItemType.Measure));
            this.Metrics = new MembersCollection <Metric <T> >(
                ItemType.Metric,
                (metric) => { this.NameSpace.Add(metric); },
                (storage) => this.NameSpace.Clear(ItemType.Metric));

            _cellValuesHelper     = new CellValuesHelper(this.Measures, this.Dimensions, this.Metrics);
            _globalGraph          = new Graph <T, U>(_cubeid, this.Config, _cellValuesHelper);
            _onDemandAggregations = new MolapAggregationsStorage <T, U>(_cubeid, this.Config, _cellValuesHelper, _canonicFormater);
        }