From 3091142cc476d494678f70d69701b1dea97ff73d Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sat, 8 Jul 2017 05:30:52 +0200 Subject: [PATCH] Merge pull request dotnet/corertdotnet/coreclr#4110 from jkotas/nmirror-merge Merge nmirror to master Signed-off-by: dotnet-bot Commit migrated from https://github.com/dotnet/coreclr/commit/5e2d5d8f2ff3e3bc317592419f11e5d6ba12dd0e --- .../System/Diagnostics/Tracing/EventSource.cs | 4 ++++ .../Tracing/TraceLogging/PropertyValue.cs | 21 ++++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs index 901c0c4..d8eec73 100644 --- a/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs +++ b/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs @@ -3271,7 +3271,11 @@ namespace System.Diagnostics.Tracing // When that is the case, we have the build the custom assemblies on a member by hand. internal static Attribute GetCustomAttributeHelper(MemberInfo member, Type attributeType, EventManifestOptions flags = EventManifestOptions.None) { +#if !ES_BUILD_PN + // On ProjectN, ReflectionOnly() always equals false. AllowEventSourceOverride is an option that allows either Microsoft.Diagnostics.Tracing or + // System.Diagnostics.Tracing EventSource to be considered valid. This should not mattter anywhere but in Microsoft.Diagnostics.Tracing (nuget package). if (!member.Module.Assembly.ReflectionOnly() && (flags & EventManifestOptions.AllowEventSourceOverride) == 0) +#endif // !ES_BUILD_PN { // Let the runtime to the work for us, since we can execute code in this context. Attribute firstAttribute = null; diff --git a/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs b/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs index 3ea7812..1542f4d 100644 --- a/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs +++ b/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs @@ -16,7 +16,12 @@ namespace System.Diagnostics.Tracing /// /// To get the value of a property quickly, use a delegate produced by . /// - internal unsafe struct PropertyValue +#if ES_BUILD_PN + public +#else + internal +#endif + unsafe struct PropertyValue { /// /// Union of well-known value types, to avoid boxing those types. @@ -198,7 +203,12 @@ namespace System.Diagnostics.Tracing return helper.GetPropertyGetter(property); } - private abstract class TypeHelper +#if ES_BUILD_PN + public +#else + private +#endif + abstract class TypeHelper { public abstract Func GetPropertyGetter(PropertyInfo property); @@ -208,7 +218,12 @@ namespace System.Diagnostics.Tracing } } - private sealed class ReferenceTypeHelper : TypeHelper where TContainer : class +#if ES_BUILD_PN + public +#else + private +#endif + sealed class ReferenceTypeHelper : TypeHelper where TContainer : class { public override Func GetPropertyGetter(PropertyInfo property) { -- 2.7.4