From bc6709e9050453f923aa1de2208604d8f2119aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20G=C3=B3reczny?= Date: Thu, 10 Dec 2020 14:31:40 +0100 Subject: [PATCH] Small fix --- .../SessionCompanion.ApiReturn/Either.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/SessionCompanion/SessionCompanion.ApiReturn/Either.cs b/SessionCompanion/SessionCompanion.ApiReturn/Either.cs index 5f279a0..f569090 100644 --- a/SessionCompanion/SessionCompanion.ApiReturn/Either.cs +++ b/SessionCompanion/SessionCompanion.ApiReturn/Either.cs @@ -22,6 +22,14 @@ this.isLeft = false; } + /// + /// Bazowa metoda dopasowania wzorów. + /// Jeśli podana jest wartość lewa, to Match zwróci wynik lewej funkcji, w przeciwnym razie wynik prawej funkcji. + /// + /// + /// Lewa funkcja + /// Prawa funkcja + /// Wynik prawej/lewej funkcji public T Match(Func leftFunc, Func rightFunc) { if (leftFunc == null) @@ -37,10 +45,6 @@ return this.isLeft ? leftFunc(this.left) : rightFunc(this.right); } - /// - /// If right value is assigned, execute an action on it. - /// - /// Akcja do wykonania public void DoRight(Action rightAction) { if (rightAction == null)