diff options
Diffstat (limited to 'src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/EventPayload.cs')
-rw-r--r-- | src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/EventPayload.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/EventPayload.cs b/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/EventPayload.cs index be97447301..5967ad6ab5 100644 --- a/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/EventPayload.cs +++ b/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/EventPayload.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Collections; +using System.Diagnostics; #if !ES_BUILD_AGAINST_DOTNET_V35 using Contract = System.Diagnostics.Contracts.Contract; @@ -26,7 +27,7 @@ namespace System.Diagnostics.Tracing { internal EventPayload(List<string> payloadNames, List<object> payloadValues) { - Contract.Assert(payloadNames.Count == payloadValues.Count); + Debug.Assert(payloadNames.Count == payloadValues.Count); m_names = payloadNames; m_values = payloadValues; @@ -40,7 +41,7 @@ namespace System.Diagnostics.Tracing get { if (key == null) - throw new System.ArgumentNullException("key"); + throw new System.ArgumentNullException(nameof(key)); int position = 0; foreach(var name in m_names) @@ -83,7 +84,7 @@ namespace System.Diagnostics.Tracing public bool ContainsKey(string key) { if (key == null) - throw new System.ArgumentNullException("key"); + throw new System.ArgumentNullException(nameof(key)); foreach (var item in m_names) { @@ -129,7 +130,7 @@ namespace System.Diagnostics.Tracing public bool TryGetValue(string key, out object value) { if (key == null) - throw new System.ArgumentNullException("key"); + throw new System.ArgumentNullException(nameof(key)); int position = 0; foreach (var name in m_names) |