QStreamable.AlterEventLifetime<TPayload> 方法
改變事件的存留期間。
命名空間: Microsoft.ComplexEventProcessing.Linq
組件: Microsoft.ComplexEventProcessing (在 Microsoft.ComplexEventProcessing.dll 中)
語法
'宣告
<ExtensionAttribute> _
Public Shared Function AlterEventLifetime(Of TPayload) ( _
source As IQStreamable(Of TPayload), _
startTimeSelector As Expression(Of Func(Of CepEvent, DateTime)), _
durationSelector As Expression(Of Func(Of CepEvent(Of TPayload), TimeSpan)) _
) As IQStreamable(Of TPayload)
'用途
Dim source As IQStreamable(Of TPayload)
Dim startTimeSelector As Expression(Of Func(Of CepEvent, DateTime))
Dim durationSelector As Expression(Of Func(Of CepEvent(Of TPayload), TimeSpan))
Dim returnValue As IQStreamable(Of TPayload)
returnValue = source.AlterEventLifetime(startTimeSelector, _
durationSelector)
public static IQStreamable<TPayload> AlterEventLifetime<TPayload>(
this IQStreamable<TPayload> source,
Expression<Func<CepEvent, DateTime>> startTimeSelector,
Expression<Func<CepEvent<TPayload>, TimeSpan>> durationSelector
)
[ExtensionAttribute]
public:
generic<typename TPayload>
static IQStreamable<TPayload>^ AlterEventLifetime(
IQStreamable<TPayload>^ source,
Expression<Func<CepEvent^, DateTime>^>^ startTimeSelector,
Expression<Func<CepEvent<TPayload>^, TimeSpan>^>^ durationSelector
)
static member AlterEventLifetime :
source:IQStreamable<'TPayload> *
startTimeSelector:Expression<Func<CepEvent, DateTime>> *
durationSelector:Expression<Func<CepEvent<'TPayload>, TimeSpan>> -> IQStreamable<'TPayload>
JScript 不支援泛型型別及方法。
型別參數
- TPayload
裝載類型。
參數
- source
型別:Microsoft.ComplexEventProcessing.Linq.IQStreamable<TPayload>
輸入資料流。
- startTimeSelector
型別:System.Linq.Expressions.Expression<Func<CepEvent, DateTime>>
修改事件開始時間的函數。
- durationSelector
型別:System.Linq.Expressions.Expression<Func<CepEvent<TPayload>, TimeSpan>>
修改事件持續時間的函數。
傳回值
型別:Microsoft.ComplexEventProcessing.Linq.IQStreamable<TPayload>
改變的資料流。
使用注意事項
在 Visual Basic 及 C# 中,您可以在任何型別 IQStreamable<TPayload> 的物件上將這個方法做為執行個體方法呼叫。使用執行個體方法語法呼叫這個方法時,請省略第一個參數。如需詳細資訊,請參閱 https://msdn.microsoft.com/zh-tw/library/bb384936(v=sql.111) 或 https://msdn.microsoft.com/zh-tw/library/bb383977(v=sql.111)。