public string GetFormatterName() { string lastPartIsFormatterName; //PathParts.LastOrDefault().Key; if (LastCharWasDelimiter) { lastPartIsFormatterName = CurrentPart; } else { lastPartIsFormatterName = PathParts.LastOrDefault().Key; PathParts.RemoveAt(PathParts.Count - 1); } CurrentPart = ""; return(lastPartIsFormatterName); }