Пример #1
0
 private JsonConverter CreateCovariantSearchSelector <T, TResult>(ISearchRequest originalSearchDescriptor)
     where T : class
     where TResult : class
 {
     SearchPathInfo.CloseOverAutomagicCovariantResultSelector(this.Infer, originalSearchDescriptor);
     return(originalSearchDescriptor.TypeSelector == null ? null : new ConcreteTypeConverter <TResult>(originalSearchDescriptor.TypeSelector));
 }
Пример #2
0
        private JsonConverter CreateMultiSearchConverter(IMultiSearchRequest descriptor)
        {
            if (descriptor.Operations != null)
            {
                foreach (var kv in descriptor.Operations)
                {
                    SearchPathInfo.CloseOverAutomagicCovariantResultSelector(this.Infer, kv.Value);
                }
            }


            var multiSearchConverter = new MultiSearchConverter(_connectionSettings, descriptor);

            return(multiSearchConverter);
        }