summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/TraceLoggingEventSource.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/TraceLoggingEventSource.cs')
-rw-r--r--src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/TraceLoggingEventSource.cs18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/TraceLoggingEventSource.cs b/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/TraceLoggingEventSource.cs
index 963c492419..07a56751ea 100644
--- a/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/TraceLoggingEventSource.cs
+++ b/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/TraceLoggingEventSource.cs
@@ -100,7 +100,7 @@ namespace System.Diagnostics.Tracing
{
if (eventSourceName == null)
{
- throw new ArgumentNullException("eventSourceName");
+ throw new ArgumentNullException(nameof(eventSourceName));
}
Contract.EndContractBlock();
}
@@ -110,12 +110,11 @@ namespace System.Diagnostics.Tracing
/// (Native API: EventWriteTransfer)
/// </summary>
/// <param name="eventName">The name of the event. Must not be null.</param>
- [SecuritySafeCritical]
public unsafe void Write(string eventName)
{
if (eventName == null)
{
- throw new ArgumentNullException("eventName");
+ throw new ArgumentNullException(nameof(eventName));
}
Contract.EndContractBlock();
@@ -138,12 +137,11 @@ namespace System.Diagnostics.Tracing
/// Options for the event, such as the level, keywords, and opcode. Unset
/// options will be set to default values.
/// </param>
- [SecuritySafeCritical]
public unsafe void Write(string eventName, EventSourceOptions options)
{
if (eventName == null)
{
- throw new ArgumentNullException("eventName");
+ throw new ArgumentNullException(nameof(eventName));
}
Contract.EndContractBlock();
@@ -175,7 +173,6 @@ namespace System.Diagnostics.Tracing
/// public instance properties of data will be written recursively to
/// create the fields of the event.
/// </param>
- [SecuritySafeCritical]
public unsafe void Write<T>(
string eventName,
T data)
@@ -212,7 +209,6 @@ namespace System.Diagnostics.Tracing
/// public instance properties of data will be written recursively to
/// create the fields of the event.
/// </param>
- [SecuritySafeCritical]
public unsafe void Write<T>(
string eventName,
EventSourceOptions options,
@@ -251,7 +247,6 @@ namespace System.Diagnostics.Tracing
/// public instance properties of data will be written recursively to
/// create the fields of the event.
/// </param>
- [SecuritySafeCritical]
public unsafe void Write<T>(
string eventName,
ref EventSourceOptions options,
@@ -297,7 +292,6 @@ namespace System.Diagnostics.Tracing
/// public instance properties of data will be written recursively to
/// create the fields of the event.
/// </param>
- [SecuritySafeCritical]
public unsafe void Write<T>(
string eventName,
ref EventSourceOptions options,
@@ -354,7 +348,6 @@ namespace System.Diagnostics.Tracing
/// the values must match the number and types of the fields described by the
/// eventTypes parameter.
/// </param>
- [SecuritySafeCritical]
private unsafe void WriteMultiMerge(
string eventName,
ref EventSourceOptions options,
@@ -415,7 +408,6 @@ namespace System.Diagnostics.Tracing
/// the values must match the number and types of the fields described by the
/// eventTypes parameter.
/// </param>
- [SecuritySafeCritical]
private unsafe void WriteMultiMergeInner(
string eventName,
ref EventSourceOptions options,
@@ -526,7 +518,6 @@ namespace System.Diagnostics.Tracing
/// The number and types of the values must match the number and types of the
/// fields described by the eventTypes parameter.
/// </param>
- [SecuritySafeCritical]
internal unsafe void WriteMultiMerge(
string eventName,
ref EventSourceOptions options,
@@ -604,7 +595,6 @@ namespace System.Diagnostics.Tracing
#endif // FEATURE_MANAGED_ETW
}
- [SecuritySafeCritical]
private unsafe void WriteImpl(
string eventName,
ref EventSourceOptions options,
@@ -721,7 +711,6 @@ namespace System.Diagnostics.Tracing
}
}
- [SecurityCritical]
private unsafe void WriteToAllListeners(string eventName, ref EventDescriptor eventDescriptor, EventTags tags, Guid* pActivityId, EventPayload payload)
{
EventWrittenEventArgs eventCallbackArgs = new EventWrittenEventArgs(this);
@@ -750,7 +739,6 @@ namespace System.Diagnostics.Tracing
System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState,
System.Runtime.ConstrainedExecution.Cer.Success)]
#endif
- [SecurityCritical]
[NonEvent]
private unsafe void WriteCleanup(GCHandle* pPins, int cPins)
{