VendingMachine.Console.AbstractConsoleReadBuffer.FilterCompletion C# (CSharp) Method

FilterCompletion() private method

private FilterCompletion ( string inTarget ) : IEnumerable
inTarget string
return IEnumerable
        private IEnumerable<string> FilterCompletion(string inTarget)
        {
            if (string.IsNullOrEmpty(inTarget)) {
                return mDic
                    .Select(item => item.Split(' ').First())
                    .GroupBy(item => item)
                    .Select(item => item.Key)
                ;
            }
            else {
                return mDic
                    .Where(item => item.StartsWith(inTarget))
                ;
            }
        }