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' using module '..\..\modules\FeedProcessing\AuditLog\Message.psm1' function Measure-Cardinality{ [CmdletBinding()] [Alias('msc')] param( [Parameter(ValueFromPipeline=$true, Mandatory=$true)] [Message] $message, [int]$groupByMinutes = $null ) BEGIN { [Message[]] $allMessages = @() } PROCESS { $allMessages += $message } END { Write-Output ([Message]::CardinalityGroupByMinute($allMessages, $groupByMinutes)) } } |