Moq |
ICallbackSetter<(Of <(<'TProperty>)>)>..::..Callback Method |
ICallbackSetter<(Of <(<'TProperty>)>)> Interface Example See Also Send Feedback |
Specifies a callback to invoke when the property is set that receives the
property value being set.
Namespace: Moq.Language
Assembly: Moq (in Moq.dll) Version: 4.0.10827.0 (4.0.0.0)
Syntax
C# |
---|
ICallbackResult Callback( Action<TProperty> action ) |
Parameters
- action
- Type: System..::..Action<(Of <(<'TProperty>)>)>
Callback method to invoke.
Examples
Invokes the given callback with the property value being set.
CopyC#
mock.SetupSet(x => x.Suspended)
.Callback((bool state) => Console.WriteLine(state));