Skip to content

Commit

Permalink
Renamed method SetHandler accepting both callbacks to SetHandlers
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaelhamed committed May 9, 2022
1 parent 6963557 commit 41f726c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4760,7 +4760,9 @@ namespace Akka.Streams.Stage
protected void SetHandler<T>(Akka.Streams.Inlet<T> inlet, System.Action onPush, System.Action onUpstreamFinish = null, System.Action<System.Exception> onUpstreamFailure = null) { }
protected void SetHandler<T>(Akka.Streams.Outlet<T> outlet, Akka.Streams.Stage.IOutHandler handler) { }
protected void SetHandler<T>(Akka.Streams.Outlet<T> outlet, System.Action onPull, System.Action onDownstreamFinish = null) { }
[System.ObsoleteAttribute("Use method `SetHandlers` instead. Will be removed in v1.5")]
protected void SetHandler<TIn, TOut>(Akka.Streams.Inlet<TIn> inlet, Akka.Streams.Outlet<TOut> outlet, Akka.Streams.Stage.InAndOutGraphStageLogic handler) { }
protected void SetHandlers<TIn, TOut>(Akka.Streams.Inlet<TIn> inlet, Akka.Streams.Outlet<TOut> outlet, Akka.Streams.Stage.InAndOutGraphStageLogic handler) { }
protected void SetKeepGoing(bool enabled) { }
protected void TryPull<T>(Akka.Streams.Inlet<T> inlet) { }
protected sealed class LambdaInHandler : Akka.Streams.Stage.InHandler
Expand Down
9 changes: 8 additions & 1 deletion src/core/Akka.Streams/Stage/GraphStage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,14 @@ protected internal void SetHandler<T>(Outlet<T> outlet, Action onPull, Action on
/// <summary>
/// Assigns callbacks for the events for an <see cref="Inlet{T}"/> and <see cref="Outlet{T}"/>.
/// </summary>
protected internal void SetHandler<TIn, TOut>(Inlet<TIn> inlet, Outlet<TOut> outlet, InAndOutGraphStageLogic handler)
[Obsolete("Use method `SetHandlers` instead. Will be removed in v1.5")]
protected internal void SetHandler<TIn, TOut>(Inlet<TIn> inlet, Outlet<TOut> outlet, InAndOutGraphStageLogic handler) =>
SetHandlers(inlet, outlet, handler);

/// <summary>
/// Assigns callbacks for the events for an <see cref="Inlet{T}"/> and <see cref="Outlet{T}"/>.
/// </summary>
protected internal void SetHandlers<TIn, TOut>(Inlet<TIn> inlet, Outlet<TOut> outlet, InAndOutGraphStageLogic handler)
{
SetHandler(inlet, handler);
SetHandler(outlet, handler);
Expand Down

0 comments on commit 41f726c

Please sign in to comment.