QStreamable.Take<TSource, TResult> 方法 (IQOrderedWindow<TSource>, UInt32, Expression<Func<CepRankedEvent<TSource>, TResult>>)

從排序視窗取得上方 [計數] 元素。 如果有繫結,則會傳回次序最低的所有元素。

命名空間:  Microsoft.ComplexEventProcessing.Linq
組件:  Microsoft.ComplexEventProcessing (在 Microsoft.ComplexEventProcessing.dll 中)

語法

'宣告
<ExtensionAttribute> _
Public Shared Function Take(Of TSource, TResult) ( _
    source As IQOrderedWindow(Of TSource), _
    count As UInteger, _
    selector As Expression(Of Func(Of CepRankedEvent(Of TSource), TResult)) _
) As IQWindowResult(Of TResult)
'用途
Dim source As IQOrderedWindow(Of TSource)
Dim count As UInteger 
Dim selector As Expression(Of Func(Of CepRankedEvent(Of TSource), TResult))
Dim returnValue As IQWindowResult(Of TResult)

returnValue = source.Take(count, selector)
public static IQWindowResult<TResult> Take<TSource, TResult>(
    this IQOrderedWindow<TSource> source,
    uint count,
    Expression<Func<CepRankedEvent<TSource>, TResult>> selector
)
[ExtensionAttribute]
public:
generic<typename TSource, typename TResult>
static IQWindowResult<TResult>^ Take(
    IQOrderedWindow<TSource>^ source, 
    unsigned int count, 
    Expression<Func<CepRankedEvent<TSource>^, TResult>^>^ selector
)
static member Take : 
        source:IQOrderedWindow<'TSource> * 
        count:uint32 * 
        selector:Expression<Func<CepRankedEvent<'TSource>, 'TResult>> -> IQWindowResult<'TResult> 
JScript 不支援泛型型別及方法。

型別參數

  • TSource
    來源裝載類型。
  • TResult
    輸出裝載類型。

參數

傳回值

型別:Microsoft.ComplexEventProcessing.Linq.IQWindowResult<TResult>
包含 [計數] 元素的視窗。

使用注意事項

在 Visual Basic 及 C# 中,您可以在任何型別 IQOrderedWindow<TSource> 的物件上將這個方法做為執行個體方法呼叫。使用執行個體方法語法呼叫這個方法時,請省略第一個參數。如需詳細資訊,請參閱 https://msdn.microsoft.com/zh-tw/library/bb384936(v=sql.111)https://msdn.microsoft.com/zh-tw/library/bb383977(v=sql.111)

請參閱

參考

QStreamable 類別

Take 多載

Microsoft.ComplexEventProcessing.Linq 命名空間