internal void PopulateSelf() { if (this.connection == null) { throw new NotSupportedException(SR.NotSupportedWhenConnectionMissing); } AdomdUtils.CheckConnectionOpened(this.connection); if (!this.IsInitialized) { this.cacheTable = new DataTable(); this.cacheTable.Locale = CultureInfo.InvariantCulture; this.cacheTable.Columns.Add("ObjectColumn_ADOMDInternal$$", typeof(object)); } if (this.isNestedSchema) { ObjectMetadataCache.DiscoverNested(this.connection, this.requestType, this.restrictions, out this.cacheDataSet); this.cacheTable.Columns.Add("__RowIndex__", typeof(int)); object[] array = new object[2]; for (int i = 0; i < this.cacheDataSet.Tables[0].Rows.Count; i++) { array[0] = null; array[1] = i; this.cacheTable.Rows.Add(array); } } else { ObjectMetadataCache.Discover(this.connection, this.requestType, this.restrictions, this.cacheTable, !this.isInitialized); } this.cacheState = MetadataCacheState.UpToDate; this.isInitialized = true; }
private void CheckCacheValid() { this.cubeInfoTable.Clear(); ObjectMetadataCache.Discover(this.connection, CubeCollectionInternal.schemaName, this.restrictions, this.cubeInfoTable, false); bool flag; if (this.cubeInfoTable.Rows.Count <= 0) { flag = false; } else { DataRow dataRow = this.cubeInfoTable.Rows[0]; flag = dataRow[this.currentTimeColumn].Equals(((DataRow)((IAdomdBaseObject)this.parentCube).MetadataData)[this.originalTimeColumn]); } this.lastCacheValidationTime = DateTime.Now; if (flag) { this.cacheState = MetadataCacheState.UpToDate; } else { this.cacheState = MetadataCacheState.Invalid; } this.EnsureValid(); }
private void Discover(DataTable destinationTable, bool doCreate) { ObjectMetadataCache.Discover(this.connection, this.requestType, this.restrictions, destinationTable, doCreate); }