public CacheTableTS(CachedTableBase ct) { this.tableName = ct.Table.Name.Name; this.typeName = ct.Type.TypeName(); this.count = ct.Count; this.hits = ct.Hits; this.invalidations = ct.Invalidations; this.loads = ct.Loads; this.sumLoadTime = ct.SumLoadTime.NiceToString(); if (ct.SubTables != null) this.subTables = ct.SubTables.Select(ctv => new CacheTableTS(ctv)).ToList(); }
public CacheTableTS(CachedTableBase ct) { this.tableName = ct.Table.Name.Name; this.typeName = ct.Type.TypeName(); this.count = ct.Count; this.hits = ct.Hits; this.invalidations = ct.Invalidations; this.loads = ct.Loads; this.sumLoadTime = ct.SumLoadTime.NiceToString(); if (ct.SubTables != null) { this.subTables = ct.SubTables.Select(ctv => new CacheTableTS(ctv)).ToList(); } }
static IEnumerable <CachedTableBase> Explore(this CachedTableBase root) { yield return(root); if (root.SubTables != null) { foreach (var tab in root.SubTables) { foreach (var tab2 in tab.Explore()) //Quadratic but tipically very small { yield return(tab2); } } } }
public CachedTableConstructor(CachedTableBase cachedTable, AliasGenerator?aliasGenerator) { this.cachedTable = cachedTable; this.table = cachedTable.Table; if (aliasGenerator != null) { this.aliasGenerator = aliasGenerator; this.currentAlias = aliasGenerator.NextTableAlias(table.Name.Name); } this.tupleType = TupleReflection.TupleChainType(table.Columns.Values.Select(GetColumnType)); this.origin = Expression.Parameter(tupleType, "origin"); }