TransactionPolicyExpressionFunctions.OnceEveryXSeconds Method |
Namespace: PostSharp.Patterns.Diagnostics.Transactions.Model
Assembly: PostSharp.Patterns.Diagnostics.Configuration (in PostSharp.Patterns.Diagnostics.Configuration.dll) Version: 6.9.11.0 (6.9.11.0)
public static bool OnceEveryXSeconds( double seconds, string key )
Parameters
- seconds
- Type: System.Double
An amount of time in seconds. - key
- Type: System.String
An arbitrary key. Required but can be empty.
Return Value
Type: BooleanNote that the side effect of calling this method, in case it returns true, is to set a timestamp for the specified key so that the next call to the method with the same value of key will return false unless it is called later than after the given time span. This is a side effect of calling this method and is not dependent of the actual result of the sampling expression. That is, the side effect will occur even in a combined expression like OnceEveryXSeconds( 1, "foo") && false.
This function is only available in the Sample expression.