public ColumnDescriptionTS(ColumnDescription a, object queryName) { var token = new ColumnToken(a, queryName); this.name = a.Name; this.type = new TypeReferenceTS(a.Type, a.Implementations); this.filterType = QueryUtils.TryGetFilterType(a.Type); this.typeColor = token.TypeColor; this.niceTypeName = token.NiceTypeName; this.isGroupable = token.IsGroupable; this.unit = a.Unit; this.format = a.Format; this.displayName = a.DisplayName; this.propertyRoute = token.GetPropertyRoute()?.ToString(); }
public ColumnDescriptionTS(ColumnDescription a, object queryName) { var token = new ColumnToken(a, queryName); this.name = a.Name; this.type = new TypeReferenceTS(a.Type, a.Implementations); this.filterType = QueryUtils.TryGetFilterType(a.Type); this.typeColor = token.TypeColor; this.niceTypeName = token.NiceTypeName; this.isGroupable = token.IsGroupable; this.hasOrderAdapter = QueryUtils.OrderAdapters.ContainsKey(token.Type); this.preferEquals = token.Type == typeof(string) && token.GetPropertyRoute() is PropertyRoute pr && typeof(Entity).IsAssignableFrom(pr.RootType) && Schema.Current.HasSomeIndex(pr); this.unit = a.Unit; this.format = a.Format; this.displayName = a.DisplayName; this.propertyRoute = token.GetPropertyRoute()?.ToString(); }