Exemple #1
0
        private CBForestDocEnumerator GetDocEnumerator(QueryOptions options, out List <string> remainingIDs)
        {
            var forestOps  = options.AsC4EnumeratorOptions();
            var enumerator = default(CBForestDocEnumerator);

            remainingIDs = new List <string>();
            if (options.Keys != null)
            {
                try {
                    remainingIDs = options.Keys.Cast <string>().ToList();
                    enumerator   = new CBForestDocEnumerator(Forest, remainingIDs.ToArray(), forestOps);
                } catch (InvalidCastException) {
                    Log.E(TAG, "options.keys must contain strings");
                    throw;
                }
            }
            else
            {
                enumerator = new CBForestDocEnumerator(Forest, options.StartKey as string, options.EndKey as string, forestOps);
            }

            return(enumerator);
        }