public BriefItemMapping_Set GetMappingSet(string SetName)
{
// Ensure the dictionary is current
if ((mappingSetsDictionary == null) || (mappingSetsDictionary.Count != MappingSets.Count))
{
if (mappingSetsDictionary == null)
mappingSetsDictionary = new Dictionary<string, BriefItemMapping_Set>(StringComparer.OrdinalIgnoreCase);
else
mappingSetsDictionary.Clear();
foreach (BriefItemMapping_Set thisSet in MappingSets)
{
mappingSetsDictionary[thisSet.SetName] = thisSet;
}
}
// Return the value
if (mappingSetsDictionary.ContainsKey(SetName))
return mappingSetsDictionary[SetName];
return null;
}