Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
350 changes: 222 additions & 128 deletions Source/Mockolate/ParameterExtensions.cs

Large diffs are not rendered by default.

1,769 changes: 814 additions & 955 deletions Source/Mockolate/ReturnsThrowsAsyncExtensions.cs

Large diffs are not rendered by default.

23 changes: 13 additions & 10 deletions Source/Mockolate/Setup/CallbacksExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ namespace Mockolate.Setup;
#endif
public static class CallbacksExtensions
{
/// <summary>
/// Appends the <paramref name="callback" /> to the <paramref name="callbacks" /> list
/// and marks it as the currently active callback. Creates the list if it is <see langword="null" />.
/// </summary>
public static Callbacks<T> Register<T>(this Callbacks<T>? callbacks, Callback<T> callback)
where T : Delegate
/// <inheritdoc cref="CallbacksExtensions" />
extension<T>(Callbacks<T>? callbacks) where T : Delegate
{
callbacks ??= [];
callbacks.Active = callback;
callbacks.Add(callback);
return callbacks;
/// <summary>
/// Appends the <paramref name="callback" /> to the <paramref name="callbacks" /> list
/// and marks it as the currently active callback. Creates the list if it is <see langword="null" />.
/// </summary>
public Callbacks<T> Register(Callback<T> callback)
{
callbacks ??= [];
callbacks.Active = callback;
callbacks.Add(callback);
return callbacks;
}
}
}
Loading
Loading