| Visual Basic (Declaration) | |
|---|---|
Public Shared Function Combine( _ ByVal propertyProjectionSelectors As IEnumerable(Of PropertyProjectionSelector) _ ) As PropertyProjectionSelector | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim propertyProjectionSelectors As IEnumerable(Of PropertyProjectionSelector) Dim value As PropertyProjectionSelector value = PropertyProjectionSelector.Combine(propertyProjectionSelectors) | |
| C# | |
|---|---|
public static PropertyProjectionSelector Combine( IEnumerable<PropertyProjectionSelector> propertyProjectionSelectors ) | |
| C++/CLI | |
|---|---|
public: static PropertyProjectionSelector^ Combine( IEnumerable<PropertyProjectionSelector^>^ propertyProjectionSelectors ) | |
Parameters
- propertyProjectionSelectors
| 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(); } | |
Use the Combine method to chain order by / then by expressions. This operation clones each property selector so there are no side effects on the propertySortSelectors passed in.
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