public static IEnumerable<string> DotByDot(string text)
{
if (text == null)
{
yield break;
}
text = text.Trim('.');
for (var length = text.Length;
length > 0;
length = text.LastIndexOf('.', length - 1, length - 1))
{
yield return text.Substring(0, length);
}
}