private String GetDisplayStringValue(DisplayStringAttribute[] attributes) { if (attributes == null || attributes.Length == 0) return null; DisplayStringAttribute attribute = attributes[0]; return attribute.Value; }
private String GetDisplayStringValue(DisplayStringAttribute[] attributes) { if (attributes == null || attributes.Length == 0) { return(null); } DisplayStringAttribute attribute = attributes[0]; return(attribute.Value); }
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; }
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); }
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; }