示例#1
0
        public override string GetLabel(GraphProperty property)
        {
            DisplayAttribute displayAttribute = property.GetAttributes <DisplayAttribute>().FirstOrDefault();
            string           defaultLabel     = labelRegex.Replace(property.Name, " $1").Substring(1);

            return(displayAttribute != null?displayAttribute.GetName() : defaultLabel);
        }
示例#2
0
        public override string GetFormatName(GraphProperty property)
        {
            DisplayFormatAttribute formatAttribute = property.GetAttributes <DisplayFormatAttribute>().FirstOrDefault();

            return(formatAttribute != null && !string.IsNullOrWhiteSpace(formatAttribute.DataFormatString) ?
                   formatAttribute.DataFormatString : null);
        }
示例#3
0
 public override string GetLabel(GraphProperty property)
 {
     DisplayAttribute displayAttribute = property.GetAttributes<DisplayAttribute>().FirstOrDefault();
     string defaultLabel = labelRegex.Replace(property.Name, " $1").Substring(1);
     return displayAttribute != null ? displayAttribute.GetName() : defaultLabel;
 }
示例#4
0
 public override string GetFormatName(GraphProperty property)
 {
     DisplayFormatAttribute formatAttribute = property.GetAttributes<DisplayFormatAttribute>().FirstOrDefault();
         return formatAttribute != null && !string.IsNullOrWhiteSpace(formatAttribute.DataFormatString) ?
         formatAttribute.DataFormatString : null;
 }