///------------------------------------------------------------- public NumberedSymbol(VariableKeyword root) { numberedSymbols = new List <string>(); defaultSymbol = string.Format(symbolFormat, root, defaultNumber).Keyword(); for (var i = 0; i < generatedCount; i++) { numberedSymbols.Add(string.Format(symbolFormat, root, i).Keyword()); } }
///------------------------------------------------------------- public string this[VariableKeyword keyword] { get { if (datas.TryGetValue(keyword.ToString(), out string result)) { return(result); } AddData(keyword); return(this[keyword]); } }
public static string S(this VariableKeyword value) { return(Enum.GetNames(typeof(VariableKeyword))[(int)value]); }
///------------------------------------------------------------- private void AddData(VariableKeyword variableKeyword) { datas.Add(variableKeyword.ToString(), $"{prefix}_{variableKeyword.S()}"); }