DevForce Help Reference
ProjectionSelector Constructor(Type,String,IProjectionSelector,String)
Example 


Any Enumerable method that takes either a predicate or a projection expression. InstanceType must be an IEnumerable.
Create a ProjectionSelector from the specified type, method name, and projection selector.
Syntax
'Declaration
 
Public Function New( _
   ByVal instanceType As Type, _
   ByVal methodName As String, _
   ByVal projection As IProjectionSelector, _
   Optional ByVal alias As String _
)
'Usage
 
Dim instanceType As Type
Dim methodName As String
Dim projection As IProjectionSelector
Dim alias As String
 
Dim instance As New ProjectionSelector(instanceType, methodName, projection, alias)

Parameters

instanceType
methodName
Any Enumerable method that takes either a predicate or a projection expression. InstanceType must be an IEnumerable.
projection
alias
Example
public void DynamicGroupAndSum() {
  var q1 = EntityQuery.Create(typeof(Order), manager)
    .GroupBy(new ProjectionSelector("ShipCity"));

  Type groupType = q1.ElementType;

  var q2 = q1.Select(
          new ProjectionSelector(groupType, "Key", "ShipCity").Combine(
          new ProjectionSelector(groupType, "Select", new ProjectionSelector("Freight")).Dot("Sum()").WithAlias("Sum")
    ));
  var list = q2.Execute();
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ProjectionSelector Class
ProjectionSelector Members
Overload List

Send Feedback