public/Message/Measure-Cardinality.ps1
using module '..\..\modules\Enums.psm1' using module '..\..\modules\Helper\DateTimeHelper.psm1' using module '..\..\modules\Helper\StringHelper.psm1' using module '..\..\modules\Helper\ObjectHelper.psm1' using module '..\..\modules\Session.psd1' function Measure-Cardinality{ [CmdletBinding()] [Alias('msc')] param( [Parameter(ValueFromPipeline=$true, Mandatory=$true)] $message, [int]$groupByMinutes = $null ) BEGIN { [Message[]] $allMessages = @() } PROCESS { $allMessages += $message } END { Write-Output ([Message]::CardinalityGroupByMinute($allMessages, $groupByMinutes)) } } |