Exemplo n.º 1
0
        public JObject Get(string contentType, string field)
        {
            if (field == null)
            {
                throw new ArgumentNullException("field");
            }

            if (contentType == null)
            {
                throw new ArgumentNullException("contentType");
            }

            if (string.IsNullOrWhiteSpace(field))
            {
                throw new ArgumentException("field was empty or only had whitespaces.", "field");
            }

            if (string.IsNullOrWhiteSpace(contentType))
            {
                throw new ArgumentException("contentType was empty or only had whitespaces.", "field");
            }

            dynamic value = new JObject();

            value.terms = index.Terms(field);
            return(value);
        }