VendingMachine.Console.AbstractConsoleReadBuffer.FilterCompletion C# (CSharp) 메소드

FilterCompletion() 개인적인 메소드

private FilterCompletion ( string inTarget ) : IEnumerable
inTarget string
리턴 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))
                ;
            }
        }