summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
diff options
context:
space:
mode:
authorSantiago Fernandez Madero <safern@microsoft.com>2019-06-03 23:37:44 -0700
committerSantiago Fernandez Madero <safern@microsoft.com>2019-06-03 23:43:54 -0700
commit9d98b4875ae456d3f58cae75c009afabf19d0d15 (patch)
tree06ab88d57e0ec25d838544ebc1da5d02852effb0 /src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
parent4adb4abf3dbeff4fb3070315368f49d66c732862 (diff)
downloadcoreclr-9d98b4875ae456d3f58cae75c009afabf19d0d15.tar.gz
coreclr-9d98b4875ae456d3f58cae75c009afabf19d0d15.tar.bz2
coreclr-9d98b4875ae456d3f58cae75c009afabf19d0d15.zip
PR Feedback
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs')
-rw-r--r--src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
index 6412676f26..b316cf936a 100644
--- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
+++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
@@ -3521,19 +3521,19 @@ namespace System.Diagnostics.Tracing
if (!reflectionOnly && (staticFieldType == typeof(EventOpcode)) || AttributeTypeNamesMatch(staticFieldType, typeof(EventOpcode)))
{
if (providerEnumKind != "Opcodes") goto Error;
- int value = (int)staticField.GetRawConstantValue();
+ int value = (int)staticField.GetRawConstantValue()!;
manifest.AddOpcode(staticField.Name, value);
}
else if (!reflectionOnly && (staticFieldType == typeof(EventTask)) || AttributeTypeNamesMatch(staticFieldType, typeof(EventTask)))
{
if (providerEnumKind != "Tasks") goto Error;
- int value = (int)staticField.GetRawConstantValue();
+ int value = (int)staticField.GetRawConstantValue()!;
manifest.AddTask(staticField.Name, value);
}
else if (!reflectionOnly && (staticFieldType == typeof(EventKeywords)) || AttributeTypeNamesMatch(staticFieldType, typeof(EventKeywords)))
{
if (providerEnumKind != "Keywords") goto Error;
- ulong value = unchecked((ulong)(long)staticField.GetRawConstantValue());
+ ulong value = unchecked((ulong)(long)staticField.GetRawConstantValue()!);
manifest.AddKeyword(staticField.Name, value);
}
#if FEATURE_MANAGED_ETW_CHANNELS && FEATURE_ADVANCED_MANAGED_ETW_CHANNELS
@@ -3730,7 +3730,7 @@ namespace System.Diagnostics.Tracing
#if ES_BUILD_STANDALONE
(new ReflectionPermission(ReflectionPermissionFlag.MemberAccess)).Assert();
#endif
- byte[] instrs = method.GetMethodBody().GetILAsByteArray()!;
+ byte[] instrs = method.GetMethodBody()!.GetILAsByteArray()!;
int retVal = -1;
for (int idx = 0; idx < instrs.Length;)
{
@@ -5828,7 +5828,7 @@ namespace System.Diagnostics.Tracing
bool anyValuesWritten = false;
foreach (FieldInfo staticField in staticFields)
{
- object constantValObj = staticField.GetRawConstantValue();
+ object? constantValObj = staticField.GetRawConstantValue();
if (constantValObj != null)
{