Esempio n. 1
0
        // Note that Dictionary.app will fall back to wikipedia for phrases so we
        // want to allow spaces.
        public bool canLookupInDictionary(NSString text)
        {
            if (NSObject.IsNullOrNil(text))
                return false;

            if (text.length() == 0)
                return false;

            if (!char.IsLetter(text.characterAtIndex(0)))
                return false;

            if (text.Any(c => c == '\t' || c == '\r' || c == '\n'))
                return false;

            return true;
        }