public void TestDataBindingChildDisplayName() { var dataSchema = new DataSchema(); var coldescRoot = ColumnDescriptor.RootColumn(dataSchema, typeof (RowValue)); var coldescRetentionTime = coldescRoot.ResolveChild("RetentionTime"); var coldescMinRetentionTime = coldescRetentionTime.ResolveChild("Min"); var coldescMeanRetentionTime = coldescRetentionTime.ResolveChild("Mean"); Assert.AreEqual("MinRetentionTime", dataSchema.GetColumnCaption(coldescMinRetentionTime).InvariantCaption); Assert.AreEqual("AverageRetentionTime", dataSchema.GetColumnCaption(coldescMeanRetentionTime).InvariantCaption); var coldescParent = coldescRoot.ResolveChild("Parent"); var coldescParentRetentionTime = coldescParent.ResolveChild("RetentionTime"); var coldescParentMeanRetentionTime = coldescParentRetentionTime.ResolveChild("Mean"); Assert.AreEqual("Parent", dataSchema.GetColumnCaption(coldescParent).InvariantCaption); Assert.AreEqual("ParentRetentionTime", dataSchema.GetColumnCaption(coldescParentRetentionTime).InvariantCaption); Assert.AreEqual("ParentAverageRetentionTime", dataSchema.GetColumnCaption(coldescParentMeanRetentionTime).InvariantCaption); }
public IColumnCaption GetColumnCaption(PivotKey pivotKey) { IColumnCaption columnCaption; if (null != ColumnSpec.Caption) { columnCaption = ColumnCaption.UnlocalizableCaption(ColumnSpec.Caption); } else if (null == ColumnDescriptor) { columnCaption = ColumnCaption.UnlocalizableCaption(PropertyPath.ToString()); } else { columnCaption = DataSchema.GetColumnCaption(ColumnDescriptor); } return(QualifyColumnCaption(pivotKey, columnCaption)); }
public string GetColumnCaption(PivotKey pivotKey, ColumnCaptionType columnCaptionType) { string columnCaption; if (null != ColumnSpec.Caption) { columnCaption = ColumnSpec.Caption; } else if (null == ColumnDescriptor) { columnCaption = PropertyPath.ToString(); } else { columnCaption = DataSchema.GetColumnCaption(DataSchema.GetColumnCaption(ColumnDescriptor), columnCaptionType); } return(QualifyColumnCaption(pivotKey, columnCaption)); }
public string GetColumnCaption(ColumnCaptionType columnCaptionType) { return(DataSchema.GetColumnCaption(this).GetCaption(DataSchema.GetDataSchemaLocalizer(columnCaptionType))); }
public void GenerateResXFile(TextWriter writer, DataSchema dataSchema, ICollection<Type> startingTypes) { var allColumnCaptions = new HashSet<ColumnCaption>(); foreach (var columnDescriptor in EnumerateAllColumnDescriptors(dataSchema, startingTypes)) { allColumnCaptions.Add(dataSchema.GetColumnCaption(columnDescriptor)); } WriteResXFile(writer, allColumnCaptions); }
public string GetColumnCaption(ColumnCaptionType columnCaptionType) { return(DataSchema.GetColumnCaption(DataSchema.GetColumnCaption(this), columnCaptionType)); }