Browse Source
refactored for into foreach and added @ for naming delegate (#811)
pull/827/head
Marvin Huber
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/Microsoft.Tye.Core/Pipeline.cs
|
|
|
@ -38,9 +38,9 @@ namespace Microsoft.Tye |
|
|
|
foreach (var (type, delegates) in callbacks) |
|
|
|
{ |
|
|
|
var method = pipeline.GetType().GetMethod("Register")!.MakeGenericMethod(type); |
|
|
|
for (var i = 0; i < delegates.Count; i++) |
|
|
|
foreach (var @delegate in delegates) |
|
|
|
{ |
|
|
|
method.Invoke(pipeline, new[] { delegates[i], }); |
|
|
|
method.Invoke(pipeline, new object?[] { @delegate }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|