From 8f7f3d562ee69f4c30a1bcdfdfd040f5067bc3ab Mon Sep 17 00:00:00 2001 From: Wraith2 Date: Tue, 11 Jun 2024 01:39:12 +0100 Subject: [PATCH] review feedback and removal of inheritdoc --- .../SqlClientDiagnostic.xml | 46 ++++--- .../Data/SqlClient/SqlClientDiagnostic.cs | 123 +++++++++--------- 2 files changed, 94 insertions(+), 75 deletions(-) diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlClientDiagnostic.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlClientDiagnostic.xml index 94014b0b7d..3711bbb7f7 100644 --- a/doc/snippets/Microsoft.Data.SqlClient/SqlClientDiagnostic.xml +++ b/doc/snippets/Microsoft.Data.SqlClient/SqlClientDiagnostic.xml @@ -10,13 +10,29 @@ The timestamp of the event. + + + Gets the element at the specified index in the read-only list. + + The zero-based index of the element to get. + The element at the specified index in the read-only list. + + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + Contains diagnostic information emitted before a command is executed. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. A nullable guid uniquely identifying the connection that the xommand is being executed on. @@ -33,7 +49,7 @@ Contains diagnostic information emitted after a command is successfully executed. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. A nullable guid uniquely identifying the connection that the command is being executed on. @@ -53,7 +69,7 @@ Contains diagnostic information emitted after a command execution fails with an exception. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. A nullable guid uniquely identifying the connection that the command is being executed on. @@ -73,7 +89,7 @@ Contains diagnostic information emitted before a connection is opened. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that is being opened. @@ -87,7 +103,7 @@ Contains diagnostic information emitted after a connection has been successfully opened. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that has been opened. @@ -107,7 +123,7 @@ Contains diagnostic information emitted after a connection open fails with an exception. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that has been opened. @@ -127,7 +143,7 @@ Contains diagnostic information emitted before a connection is closed. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that is being closed. @@ -144,7 +160,7 @@ Contains diagnostic information emitted after a connection has been successfully closed. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that has been closed. @@ -161,7 +177,7 @@ Contains diagnostic information emitted after a connection close fails with an exception. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that has been closed. @@ -181,7 +197,7 @@ Contains diagnostic information emitted before a transaction is opened. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that the transaction belongs to. @@ -198,7 +214,7 @@ Contains diagnostic information emitted after a transaction is successfully committed. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that the transaction belongs to. @@ -215,7 +231,7 @@ Contains diagnostic information emitted after a transaction commit fails with an exception. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that the transaction belongs to. @@ -235,7 +251,7 @@ Contains diagnostic information emitted before a transaction rollback is rolled back. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that the transaction belongs to. @@ -255,7 +271,7 @@ Contains diagnostic information emitted after a transaction is rolled back successfully. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that the transaction belongs to. @@ -275,7 +291,7 @@ Contains diagnostic information emitted after a transaction roll back failes with an exception. - The name of the event that that needs to be enabled for the event to be raised. + The name of the event that needs to be enabled for the event to be raised. The connection object that the transaction belongs to. diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnostic.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnostic.cs index a42b8a3f0f..51a2f8f0ba 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnostic.cs +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnostic.cs @@ -38,10 +38,10 @@ internal SqlClientCommandBefore(Guid operationId, string operation, long timesta /// public SqlCommand Command { get; } - /// > + /// public int Count => 3 + 3; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -56,10 +56,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -102,9 +102,10 @@ internal SqlClientCommandAfter(Guid operationId, string operation, long timestam /// public IDictionary Statistics { get; } - /// > + /// public int Count => 3 + 4; - /// > + + /// public KeyValuePair this[int index] { get => index switch @@ -120,10 +121,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -166,9 +167,10 @@ internal SqlClientCommandError(Guid operationId, string operation, long timestam /// public Exception Exception { get; } - /// > + /// public int Count => 3 + 4; - /// > + + /// public KeyValuePair this[int index] { get => index switch @@ -184,10 +186,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -224,10 +226,10 @@ internal SqlClientConnectionOpenBefore(Guid operationId, string operation, long /// public string ClientVersion { get; } - /// > + /// public int Count => 3 + 2; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -241,10 +243,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -287,10 +289,10 @@ internal SqlClientConnectionOpenAfter(Guid operationId, string operation, long t /// public IDictionary Statistics { get; } - /// > + /// public int Count => 3 + 4; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -306,10 +308,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -354,10 +356,10 @@ internal SqlClientConnectionOpenError(Guid operationId, string operation, long t /// public Exception Exception { get; } - /// > + /// public int Count => 3 + 4; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -373,10 +375,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -416,10 +418,10 @@ internal SqlClientConnectionCloseBefore(Guid operationId, string operation, long /// public IDictionary Statistics { get; } - /// > + /// public int Count => 3 + 3; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -434,10 +436,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -477,10 +479,10 @@ internal SqlClientConnectionCloseAfter(Guid operationId, string operation, long /// public IDictionary Statistics { get; } - /// > + /// public int Count => 3 + 3; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -495,10 +497,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -543,10 +545,10 @@ internal SqlClientConnectionCloseError(Guid operationId, string operation, long /// public Exception Exception { get; } - /// > + /// public int Count => 3 + 4; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -562,10 +564,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -605,10 +607,10 @@ internal SqlClientTransactionCommitBefore(Guid operationId, string operation, lo /// public long? TransactionId { get; } - /// > + /// public int Count => 3 + 3; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -623,10 +625,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -666,10 +668,11 @@ internal SqlClientTransactionCommitAfter(Guid operationId, string operation, lon public SqlConnection Connection { get; } /// public long? TransactionId { get; } - /// > + + /// public int Count => 3 + 3; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -684,10 +687,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -731,10 +734,10 @@ internal SqlClientTransactionCommitError(Guid operationId, string operation, lon /// public Exception Exception { get; } - /// > + /// public int Count => 3 + 4; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -750,10 +753,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -797,10 +800,10 @@ internal SqlClientTransactionRollbackBefore(Guid operationId, string operation, /// public string TransactionName { get; } - /// > + /// public int Count => 3 + 4; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -816,10 +819,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -862,10 +865,10 @@ internal SqlClientTransactionRollbackAfter(Guid operationId, string operation, l /// public string TransactionName { get; } - /// > + /// public int Count => 3 + 4; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -881,10 +884,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count; @@ -931,10 +934,10 @@ internal SqlClientTransactionRollbackError(Guid operationId, string operation, l /// public Exception Exception { get; } - /// > + /// public int Count => 3 + 5; - /// > + /// public KeyValuePair this[int index] { get => index switch @@ -951,10 +954,10 @@ public KeyValuePair this[int index] }; } - /// > + /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - /// > + /// public IEnumerator> GetEnumerator() { int count = Count;