HpcLinqQueryable.LongSelect Method
Transforms each record in a set of records into a new form by using an index for the record that is an Int64.
Namespace: Microsoft.Hpc.Linq
Assembly: Microsoft.Hpc.Linq (in Microsoft.Hpc.Linq.dll)
Usage
'Usage
Dim source As IQueryable(Of TSource)
Dim selector As Expression(Of Func(Of TSource, Long, TResult))
Dim returnValue As IQueryable(Of TResult)
returnValue = HpcLinqQueryable.LongSelect(source, selector)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function LongSelect(Of TSource, TResult) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Long, TResult)) _
) As IQueryable(Of TResult)
[ExtensionAttribute]
public static IQueryable<TResult> LongSelect<TSource,TResult> (
IQueryable<TSource> source,
Expression<Func<TSource,long,TResult>> selector
)
[ExtensionAttribute]
public:
generic<typename TSource, typename TResult>
static IQueryable<TResult>^ LongSelect (
IQueryable<TSource>^ source,
Expression<Func<TSource, long long, TResult>^>^ selector
)
J# supports the use of generic APIs, but not the declaration of new ones.
JScript does not support generic types or methods.
GenericParameters
- TSource
The type of the records in the source parameter.
- TResult
The type of the return value for the function that the selector parameter specifies.
Parameters
- source
A System.Linq.IQueryable<TSource> interface for the set of records that you want to process.
- selector
A System.Linq.Expressions.Expression(Func(TSource, Int64, TResult)) object that specifies a function that transforms the record. The second parameter of this function represents the index of the source element.
Return Value
An IQueryable interface that contains the transformed records.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | The specified source or selector parameter is a null reference (Nothing in Visual Basic). |
Remarks
Use this method if you want to perform the same query as the Select method, but want to use an index that is an Int64 rather than an Int32 in the function that transforms the record.
To transform the records in a set of records by using a calculation that does not depend on the index of the record, use the Select method.
Use the GetEnumerator method or the foreach statement of the C# language (For Each in Visual Basic) to get the results of the query. The enumerator contains the transformed form of the set of records specified in the source parameter.
In Visual Basic and C#, you can call this method as an instance method on any object of type IQueryable<TSource>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
This method has at least one parameter of type Expression with a type argument that is one of the Func types. For these parameters, you can pass in a lambda expression and it compiles to an Expression.
For more information about how the query runs and its behavior, see the Remarks section for the Select method.
Platform Note: This method was introduced in Windows HPC Server 2008 R2 with Service Pack 2 (SP2) and is not supported in previous versions.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012
Target Platforms
Windows XP, Windows Vista, Windows 7, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, with HPC Pack Client Utilities
See Also
Reference
HpcLinqQueryable Class
HpcLinqQueryable Members
Microsoft.Hpc.Linq Namespace
Select
Select
Select
LongSelectMany
Build Date:
2013-04-22