T
IdeaBlade DevForce 2010 Help Reference
Combine<T> Method
See Also  Example Send Feedback
IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > CompositePropertySelector Class : Combine<T> Method



compositeSelectors
Combines a collection of PropertySortSelectors.

Syntax

Visual Basic (Declaration) 
Protected Shared Function Combine(Of T As CompositePropertySelector)( _
   ByVal compositeSelectors As IEnumerable(Of T) _
) As T
Visual Basic (Usage)Copy Code
Dim compositeSelectors As IEnumerable(Of T)
Dim value As T
 
value = CompositePropertySelector.Combine(Of T)(compositeSelectors)
C# 
protected static T Combine<T>( 
   IEnumerable<T> compositeSelectors
)
where T: CompositePropertySelector
C++/CLI 
protected:
static T^ Combinegeneric<typename T>
( 
   IEnumerable<T^>^ compositeSelectors
) 
where T: CompositePropertySelector

Parameters

compositeSelectors

Type Parameters

T

Example

C#Copy Code
public void SampleCombine() {
  // Sample showing sort by Country and CompanyName properties of Customer.
  var mgr = new DomainModelEntityManager();
  var selector1 = new PropertySortSelector(typeof(Customer), "Country");
  var selector2 = new PropertySortSelector(typeof(Customer), "CompanyName");
  var combinedSelector = PropertySortSelector.Combine(new[] { selector1, selector2 });
  var results = mgr.Customers.OrderBySelector(combinedSelector).ToList();
}

Remarks

Use the Combine method to chain selectors. This operation clones each property selector so there are no side effects on the propertySortSelectors passed in.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.