Exemplo n.º 1
0
 private String GetDisplayStringValue(DisplayStringAttribute[] attributes)
 {
     if (attributes == null || attributes.Length == 0)
         return null;
     DisplayStringAttribute attribute = attributes[0];
     return attribute.Value;
 }
Exemplo n.º 2
0
        private String GetDisplayStringValue(DisplayStringAttribute[] attributes)
        {
            if (attributes == null || attributes.Length == 0)
            {
                return(null);
            }
            DisplayStringAttribute attribute = attributes[0];

            return(attribute.Value);
        }
Exemplo n.º 3
0
 private string GetDisplayStringValue(DisplayStringAttribute[] a)
 {
     if (a == null || a.Length == 0) return null;
     DisplayStringAttribute dsa = a[0];
     if (!string.IsNullOrEmpty(dsa.ResourceKey))
     {
         ResourceManager rm = new ResourceManager(type);
         return rm.GetString(dsa.ResourceKey);
     }
     return dsa.Value;
 }
Exemplo n.º 4
0
        private string GetDisplayStringValue(DisplayStringAttribute[] a)
        {
            if (a == null || a.Length == 0)
            {
                return(null);
            }
            DisplayStringAttribute dsa = a[0];

            if (!string.IsNullOrEmpty(dsa.ResourceKey))
            {
                ResourceManager rm = new ResourceManager(_enumType);
                return(rm.GetString(dsa.ResourceKey));
            }
            return(dsa.Value);
        }
Exemplo n.º 5
0
        private string GetDisplayStringValue(DisplayStringAttribute[] attributes)
        {
            if (attributes == null || attributes.Length == 0)
                return null;

            var dsa = attributes[0];
            return ! string.IsNullOrEmpty(dsa.ResourceKey) ? new ResourceManager(_type).GetString(dsa.ResourceKey) : dsa.Value;
        }