public static NameSyntax GetLastDottedName(this NameSyntax nameSyntax) { var parts = nameSyntax.GetNameParts(); return(parts[parts.Count - 1]); }