public string GetColumnCaption(ColumnCaption columnCaption, ColumnCaptionType columnCaptionType) { if (columnCaptionType == ColumnCaptionType.invariant) { return(columnCaption.InvariantCaption); } return(DataSchemaLocalizer.LookupColumnCaption(columnCaption)); }
public bool HasEntry(ColumnCaption caption) { if (!caption.IsLocalizable) { return true; } return ColumnCaptionResourceManagers .Any(resourceManager => null != resourceManager.GetString(caption.InvariantCaption)); }
public bool HasEntry(ColumnCaption caption) { if (!caption.IsLocalizable) { return(true); } return(ColumnCaptionResourceManagers .Any(resourceManager => null != resourceManager.GetString(caption.InvariantCaption))); }
public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (ColumnCaption != null ? ColumnCaption.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DataSchemaLocalizer != null ? DataSchemaLocalizer.GetHashCode() : 0); return(hashCode); } }
public virtual IColumnCaption GetColumnCaption(ColumnDescriptor columnDescriptor) { DisplayNameAttribute displayNameAttribute = columnDescriptor.GetAttributes().OfType <DisplayNameAttribute>().FirstOrDefault(); if (null != displayNameAttribute) { return(ColumnCaption.UnlocalizableCaption(displayNameAttribute.DisplayName)); } return(FormatChildDisplayName(columnDescriptor.Parent, GetBaseDisplayName(columnDescriptor))); }
public string LookupColumnCaption(ColumnCaption caption) { foreach (var columnCaptionResourceManager in ColumnCaptionResourceManagers) { string localizedCaption = columnCaptionResourceManager.GetString(caption.InvariantCaption); if (null != localizedCaption) { return(localizedCaption); } } return(caption.InvariantCaption); }
private IColumnCaption FormatChildDisplayName(ColumnDescriptor columnDescriptor, IColumnCaption childDisplayName) { if (null == columnDescriptor) { return(childDisplayName); } var childDisplayNameAttribute = columnDescriptor.GetAttributes().OfType <ChildDisplayNameAttribute>().FirstOrDefault(); if (null != childDisplayNameAttribute) { childDisplayName = new ColumnCaption(string.Format(childDisplayNameAttribute.InvariantFormat, childDisplayName.GetCaption(DataSchemaLocalizer.INVARIANT))); } return(FormatChildDisplayName(columnDescriptor.Parent, childDisplayName)); }
public string LookupColumnCaption(ColumnCaption caption) { if (!caption.IsLocalizable) { return caption.InvariantCaption; } foreach (var columnCaptionResourceManager in ColumnCaptionResourceManagers) { string localizedCaption = columnCaptionResourceManager.GetString(caption.InvariantCaption); if (null != localizedCaption) { return localizedCaption; } } return caption.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 static IColumnCaption MakeCaptionComponent(object part) { if (part == null) { return(EMPTY); } IColumnCaption captionComponent = part as IColumnCaption; if (captionComponent != null) { return(captionComponent); } var formattable = part as IFormattable; if (formattable != null) { return(new FormattableCaption(formattable)); } return(ColumnCaption.UnlocalizableCaption(part.ToString())); }
public string GetLocalizedColumnCaption(ColumnCaption columnCaption) { return(DataSchemaLocalizer.LookupColumnCaption(columnCaption)); }
public EditDescription(ColumnCaption columnCaption, object value) { ColumnCaption = columnCaption; Value = value; }
public bool HasEntry(ColumnCaption caption) { return(ColumnCaptionResourceManagers .Any(resourceManager => null != resourceManager.GetString(caption.InvariantCaption))); }
public string GetLocalizedColumnCaption(ColumnCaption columnCaption) { return DataSchemaLocalizer.LookupColumnCaption(columnCaption); }
public string GetColumnCaption(ColumnCaption columnCaption, ColumnCaptionType columnCaptionType) { if (columnCaptionType == ColumnCaptionType.invariant) { return columnCaption.InvariantCaption; } return DataSchemaLocalizer.LookupColumnCaption(columnCaption); }
protected bool Equals(ColumnCaption other) { return(string.Equals(InvariantCaption, other.InvariantCaption)); }