public Task<bool> HeartbeatAsync( Func<byte> detailsFunc = null, Nullable<TimeSpan> interval = null )
Public Function HeartbeatAsync ( Optional detailsFunc As Func(Of Byte()) = Nothing, Optional interval As Nullable(Of TimeSpan) = Nothing ) As Task(Of Boolean)
public: Task<bool>^ HeartbeatAsync( Func<array<unsigned char>^>^ detailsFunc = nullptr, Nullable<TimeSpan> interval = nullptr )
member HeartbeatAsync : ?detailsFunc : Func<byte> * ?interval : Nullable<TimeSpan> (* Defaults: let _detailsFunc = defaultArg detailsFunc null let _interval = defaultArg interval null *) -> Task<bool>
This is a convienence method that can be used to make it easy to restrict how often activity heartbeats are actually recorded. The activity can call this as often as it likes but the method schedules heartbeat times and only transmits a heartbeat when this time has been reached.
By default, the method records heartbeats at 1/2 the activity's heartbeat timeout, but this can be customized via the interval parameter. No heartbeat details will be recorded by default, but you can customize this by passing a detailsFunc.
|Any detailsFunc passed will only be called when a heartbeat is scheduled.|