Class QueryCreator
Creates (IQueryable) Query instances that actually have a backing data source. this class is almost analogous to the DLinqSerializer class in that it works with the CustomExpressionXmlConverter by providing the data source to the Query (IQueryable) when it is deserialized.
Inheritance
Namespace: Sartorius.SAF.Serialization
Assembly: Sartorius.SAF.dll
Syntax
public class QueryCreator
Constructors
View SourceQueryCreator()
Create a new instance of QueryCreator.
Declaration
public QueryCreator()
QueryCreator(Func<Type, Object>)
Relies upon a function to get objects. Could alternatively have required an interface as a ctor argument, but a fn. parameters seems even more generic an approach. If we only need 1 method, then why require an entire interface? Also, this way allows a static class method to be used.
Declaration
public QueryCreator(Func<Type, dynamic> fnGetObjects)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Type, System.Object> | fnGetObjects | function that returns a dynamic which is the IEnumerable`1 of element type that is the Type argument to the function (fnGetObjects). |
Methods
View SourceCreateQuery(Type)
called during deserialization.
Declaration
public dynamic CreateQuery(Type elementType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | elementType |
Returns
Type | Description |
---|---|
System.Object |