Ejemplo n.º 1
0
            public string Convert(string attrName)
            {
                string groupName;

                if (!_attributeToGroupDictionary.TryGetValue(attrName, out groupName))
                {
                    groupName = PopularAttributes.Contains(attrName)
                        ? PopularGroupName
                        : GroupStringConverter.Convert(attrName).GroupName;
                    _attributeToGroupDictionary[attrName] = groupName;
                }
                return(groupName);
            }
Ejemplo n.º 2
0
 public string?Convert(string?attrName)
 {
     if (attrName is null)
     {
         return(null);
     }
     if (!_attributeToGroupDictionary.TryGetValue(attrName, out var groupName))
     {
         groupName = PopularAttributes.Contains(attrName)
             ? PopularGroupName
             : GroupStringConverter.Convert(attrName).GroupName;
         _attributeToGroupDictionary[attrName] = groupName;
     }
     return(groupName);
 }