CepStream.AlterEventLifetime<TPayload> Method (CepStream<TPayload>, Expression<Func<CepEvent, DateTime>>, Expression<Func<CepEvent<TPayload>, TimeSpan>>)
Alters the lifetime of the events in the stream. This method can change both the start time and end time of an event.
Namespace: Microsoft.ComplexEventProcessing.Linq
Assembly: Microsoft.ComplexEventProcessing (in Microsoft.ComplexEventProcessing.dll)
Syntax
public static CepStream<TPayload> AlterEventLifetime<TPayload>(
this CepStream<TPayload> source,
Expression<Func<CepEvent, DateTime>> startTimeFunc,
Expression<Func<CepEvent<TPayload>, TimeSpan>> lifeTimeFunc
)
public:
generic<typename TPayload>
[ExtensionAttribute]
static CepStream<TPayload>^ AlterEventLifetime(
CepStream<TPayload>^ source,
Expression<Func<CepEvent^, DateTime>^>^ startTimeFunc,
Expression<Func<CepEvent<TPayload>^, TimeSpan>^>^ lifeTimeFunc
)
static member AlterEventLifetime<'TPayload> :
source:CepStream<'TPayload> *
startTimeFunc:Expression<Func<CepEvent, DateTime>> *
lifeTimeFunc:Expression<Func<CepEvent<'TPayload>, TimeSpan>> -> CepStream<'TPayload>
<ExtensionAttribute>
Public Shared Function AlterEventLifetime(Of TPayload) (
source As CepStream(Of TPayload),
startTimeFunc As Expression(Of Func(Of CepEvent, Date)),
lifeTimeFunc As Expression(Of Func(Of CepEvent(Of TPayload), TimeSpan))
) As CepStream(Of TPayload)
Parameters
source
Type: Microsoft.ComplexEventProcessing.Linq.CepStream<TPayload>The input stream.
startTimeFunc
Type: System.Linq.Expressions.Expression<Func<CepEvent, DateTime>>The function that defines the new event start time given an event.
lifeTimeFunc
Type: System.Linq.Expressions.Expression<Func<CepEvent<TPayload>, TimeSpan>>The function that defines the new event life time given an event.
Return Value
Type: Microsoft.ComplexEventProcessing.Linq.CepStream<TPayload>
A new stream with changed event lifetimes.
Type Parameters
- TPayload
The type of the input event payload.
See Also
CepStream Class
Microsoft.ComplexEventProcessing.Linq Namespace
Return to top