Skip to content

Commit 81bc54e

Browse files
committed
using correct parameter counts for Events
1 parent e5348be commit 81bc54e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/WebJobs.Script.WebHost/Diagnostics/ExtendedEventSource.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System;
55
using System.Diagnostics.CodeAnalysis;
66
using System.Diagnostics.Tracing;
7-
using System.Reflection;
87

98
namespace Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics
109
{
@@ -113,7 +112,7 @@ protected void WriteEvent(int eventNum, string a, string b, int c, string d, str
113112
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
114113
protected void WriteEvent(int eventNum, string a, string b, string c, string d, string e, string f, string g, string h, string i, string j, string k)
115114
{
116-
int count = MethodBase.GetCurrentMethod().GetParameters().Length;
115+
int count = 11;
117116
fixed (char* aPtr = a,
118117
bPtr = b,
119118
cPtr = c,
@@ -158,7 +157,7 @@ protected void WriteEvent(int eventNum, string a, string b, string c, string d,
158157
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
159158
protected void WriteEvent(int eventNum, string a, string b, string c, string d, string e, string f, string g, string h, string i, string j, string k, string l, string m)
160159
{
161-
int count = MethodBase.GetCurrentMethod().GetParameters().Length;
160+
int count = 13;
162161
fixed (char* aPtr = a,
163162
bPtr = b,
164163
cPtr = c,
@@ -209,7 +208,7 @@ protected void WriteEvent(int eventNum, string a, string b, string c, string d,
209208
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
210209
protected void WriteEvent(int eventNum, string a, string b, string c, string d, long e, long f, long g, long h, string i, string j)
211210
{
212-
int count = MethodBase.GetCurrentMethod().GetParameters().Length;
211+
int count = 10;
213212
fixed (char* aPtr = a,
214213
bPtr = b,
215214
cPtr = c,
@@ -248,7 +247,7 @@ protected void WriteEvent(int eventNum, string a, string b, string c, string d,
248247
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
249248
protected void WriteEvent(int eventNum, string a, string b, string c, string d, string e, string f)
250249
{
251-
int count = MethodBase.GetCurrentMethod().GetParameters().Length;
250+
int count = 6;
252251
fixed (char* aPtr = a,
253252
bPtr = b,
254253
cPtr = c,

0 commit comments

Comments
 (0)