| AuditExtensionsIf Method |
Conditionally Applies a section of the fluent syntax to the audit.
Namespace:
SanteDB.Core.Security.Audit
Assembly:
SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.481-alpha
Syntax public static IAuditBuilder If(
this IAuditBuilder builder,
bool condition,
Func<IAuditBuilder, IAuditBuilder> then,
Func<IAuditBuilder, IAuditBuilder> otherwise = null
)
<ExtensionAttribute>
Public Shared Function If (
builder As IAuditBuilder,
condition As Boolean,
then As Func(Of IAuditBuilder, IAuditBuilder),
Optional otherwise As Func(Of IAuditBuilder, IAuditBuilder) = Nothing
) As IAuditBuilder
public:
[ExtensionAttribute]
static IAuditBuilder^ If(
IAuditBuilder^ builder,
bool condition,
Func<IAuditBuilder^, IAuditBuilder^>^ then,
Func<IAuditBuilder^, IAuditBuilder^>^ otherwise = nullptr
)
[<ExtensionAttribute>]
static member If :
builder : IAuditBuilder *
condition : bool *
then : Func<IAuditBuilder, IAuditBuilder> *
?otherwise : Func<IAuditBuilder, IAuditBuilder>
(* Defaults:
let _otherwise = defaultArg otherwise null
*)
-> IAuditBuilder
Parameters
- builder
- Type: SanteDB.Core.Security.AuditIAuditBuilder
- condition
- Type: SystemBoolean
Condition that evaluates to true/false. - then
- Type: SystemFuncIAuditBuilder, IAuditBuilder
A function/lambda that is executed when the condition is true. - otherwise (Optional)
- Type: SystemFuncIAuditBuilder, IAuditBuilder
An optional function/lambda that is executed when the condition is false.
Return Value
Type:
IAuditBuilderThe
IAuditBuilder in the current chain.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAuditBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also