







![]() |
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: 2.6.1014.1 (2.6.0.0)
Syntax
C# |
---|
ICallbackResult Callback( Action<TProperty> callback ) |
Parameters
- callback
- Type: Action<(Of <(TProperty>)>)
Callback method to invoke.
Examples
Invokes the given callback with the property value being set.
CopyC#

mock.ExpectSet(x => x.Suspended)
.Callback((bool state) => Console.WriteLine(state));