Ejemplo n.º 1
0
            public DimensionMembersCollection()
            {
                _keybuilder = AbsIdentityKey <T> .Create();

                _type            = ItemType.Member;
                this.memberOnAdd = (item) =>
                {
                    if (item.ID.Equals(default(T)))
                    {
                        item.ID = _keybuilder.GetNextKey();
                    }
                };
                this.Init();
            }
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);
        }