Owin.Loader.DefaultLoader.DotByDot C# (CSharp) Method

DotByDot() public static method

public static DotByDot ( string text ) : IEnumerable
text string
return IEnumerable
        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);
            }
        }