internal static bool DoesMapMatchMember(this ColumnMap map, Member member, int ordinal) { // check to see if name is a number and if that number matches the ordinal int number; if (Int32.TryParse(map.NameWithoutPrefixesOrSuffixes, out number)) { return(number == ordinal); } return(member.LevelName == map.NameWithoutPrefixesOrSuffixes); }
internal static string GetMemberProperty(this ColumnMap map, Member member) { if (map.Name.EndsWith(ColumnMap.CaptionToken, StringComparison.OrdinalIgnoreCase)) { return(member.Caption); } if (map.Name.EndsWith(ColumnMap.LevelNameToken, StringComparison.OrdinalIgnoreCase)) { return(member.LevelName); } if (map.Name.EndsWith(ColumnMap.UniqueNameToken, StringComparison.OrdinalIgnoreCase)) { return(member.UniqueName); } if (map.Name.EndsWith(ColumnMap.LevelNumberToken, StringComparison.OrdinalIgnoreCase)) { return(member.LevelNumber); } return(null); }