Example #1
0
 public ResultRecord Read(IDataResults reader)
 {
     return(reader
            .AsEnumerable <ResultRecord>(b => b
                                         .For <ResultRecord>(c => c.UseFactoryMethod(() => null))
                                         )
            .FirstOrDefault());
 }
Example #2
0
            public TestObject Read(IDataResults result)
            {
                var obj1 = result.AsEnumerable <TestObject>().First();
                var obj2 = result.GetNextEnumerable <TestObject>().First();

                obj1.TestString = obj2.TestString;
                return(obj1);
            }
Example #3
0
            public IEnumerable <TestObjectTwoConstructors> Read(IDataResults result)
            {
                var constructor = typeof(TestObjectTwoConstructors).GetConstructor(new[] { typeof(int), typeof(string) });

                return(result
                       .AsEnumerable <TestObjectTwoConstructors>(b => b
                                                                 .For <TestObjectTwoConstructors>(c => c.UseConstructor(constructor))
                                                                 )
                       .ToList());
            }
 public IReadOnlyList <TestNumber> Read(IDataResults result)
 {
     return(result
            .AsEnumerable <TestNumber>(b => b
                                       .For <TestNumber>(c => c
                                                         .UseType <TestSmallNumber>()
                                                         .UseSubtype <TestBigNumber>(r => r.GetInt32(0) > 3)
                                                         )
                                       )
            .ToList());
 }
Example #5
0
            public Result Read(IDataResults result)
            {
                var results     = result.AsEnumerable <string>();
                var firstResult = results.First();
                var paramValue  = result.GetOutputParameter <string>("value");

                return(new Result
                {
                    OutputParameterValue = paramValue,
                    ResultSetValue = firstResult
                });
            }
Example #6
0
 public T Read(IDataResults result)
 {
     return(result.AsEnumerable <T>().FirstOrDefault());
 }
Example #7
0
            public ProductGroup Read(IDataResults result)
            {
                var productGroup = result.AsEnumerable <ProductGroup>().Single();

                return(productGroup);
            }
Example #8
0
 public string[] Read(IDataResults result)
 {
     return(result.AsEnumerable <string[]>().FirstOrDefault());
 }
Example #9
0
 public TestObject1 Read(IDataResults result)
 {
     return(result.AsEnumerable <TestObject1>().FirstOrDefault());
 }
Example #10
0
 public string Read(IDataResults result)
 {
     return(result.AsEnumerable <string>().First());
 }
Example #11
0
 public List <int> Read(IDataResults result)
 {
     return(result.AsEnumerable <int>().ToList());
 }
Example #12
0
 public object[] Read(IDataResults result)
 {
     return(result.AsEnumerable <object[]>().FirstOrDefault());
 }
Example #13
0
 public IReadOnlyList <JaccardMatch> Read(IDataResults result)
 {
     return(result.AsEnumerable <JaccardMatch>().ToList());
 }
Example #14
0
 public IReadOnlyList <TfIdfResult> Read(IDataResults result)
 {
     return(result.AsEnumerable <TfIdfResult>().ToList());
 }
Example #15
0
 public QueryValues Read(IDataResults result)
 {
     return(result.AsEnumerable <QueryValues>().Single());
 }