10[
EventSource(
Name =
"Private.InternalDiagnostics.System.Net.Http", LocalizationResources =
"FxResources.System.Net.Http.SR")]
29 private void UriBaseAddress(
string uriBaseAddress,
string objName,
int objHash)
31 WriteEvent(17, uriBaseAddress, objName, objHash);
53 public void HandlerMessage(
int poolId,
int workerId,
int requestId,
string memberName,
string message)
55 WriteEvent(20, poolId, workerId, requestId, memberName, message);
59 public void HandlerMessageError(
int poolId,
int workerId,
int requestId,
string memberName,
string message)
61 WriteEvent(23, poolId, workerId, requestId, memberName, message);
88 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:UnrecognizedReflectionPattern", Justification =
"Parameters to this method are primitive and are trimmer safe")]
90 private unsafe
void WriteEvent(
int eventId,
int arg1,
int arg2,
int arg3,
string arg4,
string arg5)
105 fixed (
char* ptr3 = arg4)
116 intPtr = (ptr =
null);
121 DataPointer = (
IntPtr)(&arg1),
124 num = (nint)(ptr2 + 1);
127 DataPointer = (
IntPtr)(&arg2),
130 num2 = (nint)(ptr2 + 2);
133 DataPointer = (
IntPtr)(&arg3),
136 num3 = (nint)(ptr2 + 3);
139 DataPointer = (
IntPtr)ptr3,
140 Size = (arg4.Length + 1) * 2
142 num4 = (nint)(ptr2 + 4);
145 DataPointer = (
IntPtr)ptr,
146 Size = (arg5.Length + 1) * 2
151 fixed (
char* ptr4 = &arg5.GetPinnableReference())
154 intPtr = (ptr = ptr4);
159 DataPointer = (
IntPtr)(&arg1),
162 num = (nint)(ptr2 + 1);
165 DataPointer = (
IntPtr)(&arg2),
168 num2 = (nint)(ptr2 + 2);
171 DataPointer = (
IntPtr)(&arg3),
174 num3 = (nint)(ptr2 + 3);
177 DataPointer = (
IntPtr)ptr3,
178 Size = (arg4.Length + 1) * 2
180 num4 = (nint)(ptr2 + 4);
183 DataPointer = (
IntPtr)ptr,
184 Size = (arg5.Length + 1) * 2
192 public static void Info(
object thisOrContextObject,
FormattableString formattableString =
null, [CallerMemberName]
string memberName =
null)
196 Log.Info(
IdOf(thisOrContextObject), memberName, (formattableString !=
null) ?
Format(formattableString) :
"");
201 public static void Info(
object thisOrContextObject,
object message, [CallerMemberName]
string memberName =
null)
210 private void Info(
string thisOrContextObject,
string memberName,
string message)
212 WriteEvent(4, thisOrContextObject, memberName ??
"(?)", message);
216 public static void Error(
object thisOrContextObject,
FormattableString formattableString, [CallerMemberName]
string memberName =
null)
220 Log.ErrorMessage(
IdOf(thisOrContextObject), memberName,
Format(formattableString));
225 public static void Error(
object thisOrContextObject,
object message, [CallerMemberName]
string memberName =
null)
234 private void ErrorMessage(
string thisOrContextObject,
string memberName,
string message)
236 WriteEvent(5, thisOrContextObject, memberName ??
"(?)", message);
240 public static void Verbose(
object thisOrContextObject,
FormattableString formattableString, [CallerMemberName]
string memberName =
null)
244 Log.ErrorMessage(
IdOf(thisOrContextObject), memberName,
Format(formattableString));
249 public static void Associate(
object first,
object second, [CallerMemberName]
string memberName =
null)
258 private void Associate(
string thisOrContextObject,
string memberName,
string first,
string second)
260 WriteEvent(3, thisOrContextObject, memberName ??
"(?)", first, second);
276 return value?.GetHashCode() ?? 0;
293 return $
"{array.GetType().GetElementType()}[{((Array)value).Length}]";
297 return $
"{collection.GetType().Name}({collection.Count})";
301 return $
"{safeHandle.GetType().Name}:{safeHandle.GetHashCode()}(0x{safeHandle.DangerousGetHandle():X})";
305 return $
"0x{value:X}";
307 string text2 =
value.ToString();
308 if (text2 ==
null || text2 ==
value.GetType().FullName)
318 switch (
s.ArgumentCount)
323 return string.Format(
s.Format,
Format(
s.GetArgument(0)));
325 return string.Format(
s.Format,
Format(
s.GetArgument(0)),
Format(
s.GetArgument(1)));
327 return string.Format(
s.Format,
Format(
s.GetArgument(0)),
Format(
s.GetArgument(1)),
Format(
s.GetArgument(2)));
330 object[] arguments =
s.GetArguments();
331 object[]
array =
new object[arguments.Length];
332 for (
int i = 0; i < arguments.Length; i++)
336 return string.Format(
s.Format,
array);
341 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:UnrecognizedReflectionPattern", Justification =
"Parameters to this method are primitive and are trimmer safe")]
343 private unsafe
void WriteEvent(
int eventId,
string arg1,
string arg2,
string arg3,
string arg4)
348 if (!
Log.IsEnabled())
368 fixed (
char* ptr6 = arg1)
379 intPtr = (ptr =
null);
380 fixed (
char* ptr2 = arg3)
386 intPtr2 = (ptr4 =
null);
391 DataPointer = (
IntPtr)ptr6,
392 Size = (arg1.Length + 1) * 2
394 num = (nint)(ptr5 + 1);
397 DataPointer = (
IntPtr)ptr,
398 Size = (arg2.Length + 1) * 2
400 num2 = (nint)(ptr5 + 2);
403 DataPointer = (
IntPtr)ptr3,
404 Size = (arg3.Length + 1) * 2
406 num3 = (nint)(ptr5 + 3);
409 DataPointer = (
IntPtr)ptr4,
410 Size = (arg4.Length + 1) * 2
415 fixed (
char* ptr7 = &arg4.GetPinnableReference())
418 intPtr2 = (ptr4 = ptr7);
423 DataPointer = (
IntPtr)ptr6,
424 Size = (arg1.Length + 1) * 2
426 num = (nint)(ptr5 + 1);
429 DataPointer = (
IntPtr)ptr,
430 Size = (arg2.Length + 1) * 2
432 num2 = (nint)(ptr5 + 2);
435 DataPointer = (
IntPtr)ptr3,
436 Size = (arg3.Length + 1) * 2
438 num3 = (nint)(ptr5 + 3);
441 DataPointer = (
IntPtr)ptr4,
442 Size = (arg4.Length + 1) * 2
449 fixed (
char* ptr8 = &arg2.GetPinnableReference())
452 intPtr = (ptr = ptr8);
453 fixed (
char* ptr2 = arg3)
459 intPtr2 = (ptr4 =
null);
464 DataPointer = (
IntPtr)ptr6,
465 Size = (arg1.Length + 1) * 2
467 num = (nint)(ptr5 + 1);
470 DataPointer = (
IntPtr)ptr,
471 Size = (arg2.Length + 1) * 2
473 num2 = (nint)(ptr5 + 2);
476 DataPointer = (
IntPtr)ptr3,
477 Size = (arg3.Length + 1) * 2
479 num3 = (nint)(ptr5 + 3);
482 DataPointer = (
IntPtr)ptr4,
483 Size = (arg4.Length + 1) * 2
488 fixed (
char* ptr7 = &arg4.GetPinnableReference())
491 intPtr2 = (ptr4 = ptr7);
496 DataPointer = (
IntPtr)ptr6,
497 Size = (arg1.Length + 1) * 2
499 num = (nint)(ptr5 + 1);
502 DataPointer = (
IntPtr)ptr,
503 Size = (arg2.Length + 1) * 2
505 num2 = (nint)(ptr5 + 2);
508 DataPointer = (
IntPtr)ptr3,
509 Size = (arg3.Length + 1) * 2
511 num3 = (nint)(ptr5 + 3);
514 DataPointer = (
IntPtr)ptr4,
515 Size = (arg4.Length + 1) * 2
524 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:UnrecognizedReflectionPattern", Justification =
"Parameters to this method are primitive and are trimmer safe")]
526 private unsafe
void WriteEvent(
int eventId,
string arg1,
int arg2,
int arg3,
int arg4)
534 fixed (
char* ptr2 = arg1)
539 DataPointer = (
IntPtr)ptr2,
540 Size = (arg1.Length + 1) * 2
544 DataPointer = (
IntPtr)(&arg2),
549 DataPointer = (
IntPtr)(&arg3),
554 DataPointer = (
IntPtr)(&arg4),
562 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:UnrecognizedReflectionPattern", Justification =
"Parameters to this method are primitive and are trimmer safe")]
564 private unsafe
void WriteEvent(
int eventId,
string arg1,
int arg2,
string arg3)
567 if (!
Log.IsEnabled())
579 fixed (
char* ptr3 = arg1)
588 intPtr = (ptr =
null);
593 DataPointer = (
IntPtr)ptr3,
594 Size = (arg1.Length + 1) * 2
596 num = (nint)(ptr2 + 1);
599 DataPointer = (
IntPtr)(&arg2),
602 num2 = (nint)(ptr2 + 2);
605 DataPointer = (
IntPtr)ptr,
606 Size = (arg3.Length + 1) * 2
611 fixed (
char* ptr4 = &arg3.GetPinnableReference())
614 intPtr = (ptr = ptr4);
619 DataPointer = (
IntPtr)ptr3,
620 Size = (arg1.Length + 1) * 2
622 num = (nint)(ptr2 + 1);
625 DataPointer = (
IntPtr)(&arg2),
628 num2 = (nint)(ptr2 + 2);
631 DataPointer = (
IntPtr)ptr,
632 Size = (arg3.Length + 1) * 2
639 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:UnrecognizedReflectionPattern", Justification =
"Parameters to this method are primitive and are trimmer safe")]
641 private unsafe
void WriteEvent(
int eventId,
string arg1,
string arg2,
int arg3)
644 if (!
Log.IsEnabled())
656 fixed (
char* ptr3 = arg1)
665 intPtr = (ptr =
null);
670 DataPointer = (
IntPtr)ptr3,
671 Size = (arg1.Length + 1) * 2
673 num = (nint)(ptr2 + 1);
676 DataPointer = (
IntPtr)ptr,
677 Size = (arg2.Length + 1) * 2
679 num2 = (nint)(ptr2 + 2);
682 DataPointer = (
IntPtr)(&arg3),
688 fixed (
char* ptr4 = &arg2.GetPinnableReference())
691 intPtr = (ptr = ptr4);
696 DataPointer = (
IntPtr)ptr3,
697 Size = (arg1.Length + 1) * 2
699 num = (nint)(ptr2 + 1);
702 DataPointer = (
IntPtr)ptr,
703 Size = (arg2.Length + 1) * 2
705 num2 = (nint)(ptr2 + 2);
708 DataPointer = (
IntPtr)(&arg3),
716 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:UnrecognizedReflectionPattern", Justification =
"Parameters to this method are primitive and are trimmer safe")]
718 private unsafe
void WriteEvent(
int eventId,
string arg1,
string arg2,
string arg3,
int arg4)
721 if (!
Log.IsEnabled())
737 fixed (
char* ptr5 = arg1)
747 intPtr = (ptr =
null);
748 fixed (
char* ptr2 = arg3)
755 DataPointer = (
IntPtr)ptr5,
756 Size = (arg1.Length + 1) * 2
758 num = (nint)(ptr4 + 1);
761 DataPointer = (
IntPtr)ptr,
762 Size = (arg2.Length + 1) * 2
764 num2 = (nint)(ptr4 + 2);
767 DataPointer = (
IntPtr)ptr3,
768 Size = (arg3.Length + 1) * 2
770 num3 = (nint)(ptr4 + 3);
773 DataPointer = (
IntPtr)(&arg4),
780 fixed (
char* ptr6 = &arg2.GetPinnableReference())
783 intPtr = (ptr = ptr6);
784 fixed (
char* ptr2 = arg3)
791 DataPointer = (
IntPtr)ptr5,
792 Size = (arg1.Length + 1) * 2
794 num = (nint)(ptr4 + 1);
797 DataPointer = (
IntPtr)ptr,
798 Size = (arg2.Length + 1) * 2
800 num2 = (nint)(ptr4 + 2);
803 DataPointer = (
IntPtr)ptr3,
804 Size = (arg3.Length + 1) * 2
806 num3 = (nint)(ptr4 + 3);
809 DataPointer = (
IntPtr)(&arg4),
836 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"parameter intent is an enum and is trimmer safe")]
860 WriteEvent(11, packageName, (
int)intent, authdata);
874 private void InitializeSecurityContext(
string credential,
string context,
string targetName, global::Interop.SspiCli.ContextFlags inFlags)
876 WriteEvent(12, credential, context, targetName, (
int)inFlags);
891 WriteEvent(15, credential, context, (
int)inFlags);
894 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"parameter errorCode is an enum and is trimmer safe")]
909 WriteEvent(14, context, inputBuffersSize, outputBufferSize, (
int)errorCode);
unsafe void WriteEventCore(int eventId, int eventDataCount, EventData *data)
override string ToString()
const EventKeywords Default
void EnumerateSecurityPackages(string securityPackage)
unsafe void WriteEvent(int eventId, string arg1, string arg2, string arg3, int arg4)
void AcceptSecurityContext(string credential, string context, global::Interop.SspiCli.ContextFlags inFlags)
void AcquireCredentialsHandle(string packageName, global::Interop.SspiCli.CredentialUse intent, string authdata)
void SecurityContextInputBuffers(string context, int inputBuffersSize, int outputBufferSize, global::Interop.SECURITY_STATUS errorCode)
static readonly System.Net.NetEventSource Log
void Associate(string thisOrContextObject, string memberName, string first, string second)
void AcquireDefaultCredential(string packageName, global::Interop.SspiCli.CredentialUse intent)
void ErrorMessage(string thisOrContextObject, string memberName, string message)
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Error(object thisOrContextObject, object message, [CallerMemberName] string memberName=null)
void Info(string thisOrContextObject, string memberName, string message)
void AcquireCredentialsHandle(string packageName, global::Interop.SspiCli.CredentialUse intent, object authdata)
unsafe void WriteEvent(int eventId, string arg1, string arg2, int arg3)
static string IdOf(object value)
static string Format(FormattableString s)
void OperationReturnedSomething(string operation, global::Interop.SECURITY_STATUS errorCode)
void AuthenticationError(string uri, string message)
static void AuthenticationError(Uri uri, string message)
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static void Associate(object first, object second, [CallerMemberName] string memberName=null)
void ContentNull(string objName, int objHash)
void HandlerMessage(int poolId, int workerId, int requestId, string memberName, string message)
static int GetHashCode(object value)
unsafe void WriteEvent(int eventId, string arg1, int arg2, string arg3)
void AcceptSecurityContext(System.Net.Security.SafeFreeCredentials credential, System.Net.Security.SafeDeleteContext context, global::Interop.SspiCli.ContextFlags inFlags)
static void UriBaseAddress(object obj, Uri baseAddress)
unsafe void WriteEvent(int eventId, int arg1, int arg2, int arg3, string arg4, string arg5)
void AuthenticationInfo(string uri, string message)
unsafe void WriteEvent(int eventId, string arg1, string arg2, string arg3, string arg4)
static void ContentNull(object obj)
unsafe void WriteEvent(int eventId, string arg1, int arg2, int arg3, int arg4)
void InitializeSecurityContext(string credential, string context, string targetName, global::Interop.SspiCli.ContextFlags inFlags)
void SspiPackageNotFound(string packageName)
void HeadersInvalidValue(string name, string rawValue)
static void Info(object thisOrContextObject, object message, [CallerMemberName] string memberName=null)
static void AuthenticationInfo(Uri uri, string message)
static object Format(object value)
void HandlerMessageError(int poolId, int workerId, int requestId, string memberName, string message)
void UriBaseAddress(string uriBaseAddress, string objName, int objHash)
void InitializeSecurityContext(System.Net.Security.SafeFreeCredentials credential, System.Net.Security.SafeDeleteContext context, string targetName, global::Interop.SspiCli.ContextFlags inFlags)
static void Verbose(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)