Skip to content

Commit e53e519

Browse files
committed
Replace TryTraceEvent with TryNotificationTraceEvent from netfx
1 parent 5af65d9 commit e53e519

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyListener.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,42 +1172,42 @@ internal static SqlNotification ProcessMessage(SqlXml xmlMessage)
11721172
catch (ArgumentException e)
11731173
{
11741174
ADP.TraceExceptionWithoutRethrow(e); // Discard failure, but trace.
1175-
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> Exception thrown - Enum.Parse failed to parse the value '{0}' of the attribute '{1}'.", xmlReader.Value, xmlReader.LocalName);
1175+
SqlClientEventSource.Log.TryNotificationTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> Exception thrown - Enum.Parse failed to parse the value '{0}' of the attribute '{1}'.", xmlReader.Value, xmlReader.LocalName);
11761176
return null;
11771177
}
11781178
}
11791179

11801180
if (MessageAttributes.All != messageAttributes)
11811181
{
1182-
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> Not all expected attributes in Message; messageAttributes = '{0}'.", (int)messageAttributes);
1182+
SqlClientEventSource.Log.TryNotificationTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> Not all expected attributes in Message; messageAttributes = '{0}'.", (int)messageAttributes);
11831183
return null;
11841184
}
11851185

11861186
// Proceed to the "Message" node.
11871187
if (!xmlReader.Read())
11881188
{
1189-
SqlClientEventSource.Log.TryTraceEvent("<Sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
1189+
SqlClientEventSource.Log.TryNotificationTraceEvent("<Sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
11901190
return null;
11911191
}
11921192

11931193
// Verify state after Read().
11941194
if ((XmlNodeType.Element != xmlReader.NodeType) || (0 != string.Compare(xmlReader.LocalName, MessageNode, StringComparison.OrdinalIgnoreCase)))
11951195
{
1196-
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
1196+
SqlClientEventSource.Log.TryNotificationTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
11971197
return null;
11981198
}
11991199

12001200
// Proceed to the Text Node.
12011201
if (!xmlReader.Read())
12021202
{
1203-
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
1203+
SqlClientEventSource.Log.TryNotificationTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
12041204
return null;
12051205
}
12061206

12071207
// Verify state after Read().
12081208
if (xmlReader.NodeType != XmlNodeType.Text)
12091209
{
1210-
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
1210+
SqlClientEventSource.Log.TryNotificationTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
12111211
return null;
12121212
}
12131213

@@ -1217,7 +1217,7 @@ internal static SqlNotification ProcessMessage(SqlXml xmlMessage)
12171217
// Proceed to the Text Node.
12181218
if (!xmlMessageReader.Read())
12191219
{
1220-
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
1220+
SqlClientEventSource.Log.TryNotificationTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
12211221
return null;
12221222
}
12231223

@@ -1228,7 +1228,7 @@ internal static SqlNotification ProcessMessage(SqlXml xmlMessage)
12281228
}
12291229
else
12301230
{
1231-
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
1231+
SqlClientEventSource.Log.TryNotificationTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
12321232
return null;
12331233
}
12341234
}
@@ -1237,7 +1237,7 @@ internal static SqlNotification ProcessMessage(SqlXml xmlMessage)
12371237
}
12381238
else
12391239
{
1240-
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
1240+
SqlClientEventSource.Log.TryNotificationTraceEvent("<sc.SqlDependencyProcessDispatcher.ProcessMessage|DEP|ERR> unexpected Read failure on xml or unexpected structure of xml.");
12411241
return null; // failure
12421242
}
12431243
}

0 commit comments

Comments
 (0)