public string GetElementName(string defaultwithprefix) { var result = CCOLElementNames.TryGetValue(defaultwithprefix, out var n); if (result == false) { throw new KeyNotFoundException($"The default {defaultwithprefix} was not found. Code generation will be faulty."); } return(n); }
public void Reset() { _lastItemDescription = new Dictionary <CCOLElementTypeEnum, string>(); // Build dictionary with all available settings CCOLElementNames.Clear(); foreach (var s in Settings.CodePieceGeneratorSettings) { foreach (var ss in s.Item2.Settings) { CCOLElementNames.Add(GetDefaultPrefix(ss.Type) + ss.Default, ss.Setting); } } }