CepWindowExtensionMethods.Avg<TPayload> Method (CepWindow<TPayload>, Expression<Func<TPayload, Int64>>)
Computes the average over all events in a window. The value to average over is defined in the input expression parameter.
Namespace: Microsoft.ComplexEventProcessing.Linq
Assembly: Microsoft.ComplexEventProcessing (in Microsoft.ComplexEventProcessing.dll)
Syntax
public static double Avg<TPayload>(
this CepWindow<TPayload> window,
Expression<Func<TPayload, long>> input
)
Type Parameters
- TPayload
Payload type of window events.
Parameters
- window
Type: Microsoft.ComplexEventProcessing.Linq.CepWindow<TPayload>
Window with the input events to which the average is applied to.
- input
Type: System.Linq.Expressions.Expression<Func<TPayload, Int64>>
Lambda expression which specifies the value that the average is computed over.
Return Value
Type: System.Double
The value that contains the average over the events in the input window.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type CepWindow<TPayload>. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=sql.105) or https://msdn.microsoft.com/en-us/library/bb383977(v=sql.105).