@@ -123,60 +123,4 @@ public static async Task<ResultType<TIn>> Tap<TIn>(
123
123
this Task < ResultType < TIn > > resultTask ,
124
124
Action < TIn > tap ) =>
125
125
( await resultTask ) . Tap ( tap ) ;
126
-
127
- /// <summary>
128
- /// Tap into the value of a <see cref="ResultType{T}" /> to perform a
129
- /// side effect
130
- /// </summary>
131
- /// <remarks>
132
- /// The tap operator will only be executed if the input
133
- /// <see cref="ResultType{T}" /> is an <see cref="OkResultType{T}" />
134
- /// </remarks>
135
- /// <param name="resultTask">The <see cref="ResultType{T}" /></param>
136
- /// <param name="tap">The side effect</param>
137
- /// <typeparam name="TIn">The result value's type</typeparam>
138
- /// <returns>The original result</returns>
139
- [ DebuggerStepperBoundary ]
140
- public static async Task < ResultType < TIn > > Tap < TIn > (
141
- this Task < ResultType < Task < TIn > > > resultTask ,
142
- Action < TIn > tap )
143
- {
144
- ResultType < Task < TIn > > result = await resultTask ;
145
- return await result . Match (
146
- async valueTask =>
147
- {
148
- TIn value = await valueTask ;
149
- tap ( value ) ;
150
- return await Result . OkAsync ( value , result . Logger ) ;
151
- } ,
152
- error => Result . ErrorAsync < TIn > ( error , result . Logger ) ) ;
153
- }
154
-
155
- /// <summary>
156
- /// Tap into the value of a <see cref="ResultType{T}" /> to perform a
157
- /// side effect
158
- /// </summary>
159
- /// <remarks>
160
- /// The tap operator will only be executed if the input
161
- /// <see cref="ResultType{T}" /> is an <see cref="OkResultType{T}" />
162
- /// </remarks>
163
- /// <param name="resultTask">The <see cref="ResultType{T}" /></param>
164
- /// <param name="tap">The side effect</param>
165
- /// <typeparam name="TIn">The result value's type</typeparam>
166
- /// <returns>The original result</returns>
167
- [ DebuggerStepperBoundary ]
168
- public static async Task < ResultType < TIn > > Tap < TIn > (
169
- this Task < ResultType < Task < TIn > > > resultTask ,
170
- Func < TIn , Task > tap )
171
- {
172
- ResultType < Task < TIn > > result = await resultTask ;
173
- return await result . Match (
174
- async valueTask =>
175
- {
176
- TIn value = await valueTask ;
177
- await tap ( value ) ;
178
- return await Result . OkAsync ( value , result . Logger ) ;
179
- } ,
180
- error => Result . ErrorAsync < TIn > ( error , result . Logger ) ) ;
181
- }
182
126
}
0 commit comments