private string GetName() { if (attributes.ContainsKey(typeof(NameAttribute))) { var attribute = attributes[typeof(NameAttribute)].CreateAttribute() as NameAttribute; return attribute.Name; } return metadata.PropertyName; }