diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml index bb3bed7879..4b8d1ffb05 100644 --- a/doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml +++ b/doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml @@ -53,7 +53,7 @@ The following example creates a an - + @@ -110,30 +110,25 @@ The following example creates a an - - Test1 ExecuteNonQueryAsync Comment - - - - + - + - + - + - + - + - + diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlBatchCommandCollection.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlBatchCommandCollection.xml index f350a48731..495d457346 100644 --- a/doc/snippets/Microsoft.Data.SqlClient/SqlBatchCommandCollection.xml +++ b/doc/snippets/Microsoft.Data.SqlClient/SqlBatchCommandCollection.xml @@ -2,8 +2,10 @@ - A collection of instances of , contained within a . - + A collection of instances of + , contained within a + . + - - Add a to the end of the . + + + + + Add a + to the end of the + . @@ -20,9 +27,14 @@ ]]> - - - Determines whether a is in the . + + + + + + Determines whether a + is in the + . @@ -30,8 +42,11 @@ ]]> - - + + + + + Copies the entire to a one dimensional array, starting at the target index of the target array. @@ -40,8 +55,11 @@ ]]> - - + + + + + Searches for the specified within the and returns the zero-based index of the first occurence within the entire . Returns the zero-based index of the first occurence within the entire . @@ -52,8 +70,11 @@ ]]> - - + + + + + Inserts an item into the at the specified index. @@ -62,9 +83,14 @@ ]]> - - - Removes the first occurence of the specific item from the . + + + + + + Removes the first occurence of the specific item from the + . + Returns if an item is successfully removed. Returns false if an item could not be removed or no item was not found. @@ -72,7 +98,10 @@ ]]> - + + + + Gets or Sets the element at the specified index. The element at the specified index. @@ -95,5 +124,11 @@ + + + + + + diff --git a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs index 678420e68d..16bab9af25 100644 --- a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs +++ b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs @@ -72,7 +72,6 @@ public partial class SqlBatchCommand : System.Data.Common.DbBatchCommand /// protected override System.Data.Common.DbParameterCollection DbParameterCollection => throw null; } - /// /// public class SqlBatchCommandCollection : System.Data.Common.DbBatchCommandCollection, System.Collections.Generic.IList { @@ -80,35 +79,34 @@ public class SqlBatchCommandCollection : System.Data.Common.DbBatchCommandCollec public override int Count => throw null; /// public override bool IsReadOnly => throw null; - /// System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; - /// + /// public override System.Collections.Generic.IEnumerator GetEnumerator() => throw null; - /// + /// public void Add(Microsoft.Data.SqlClient.SqlBatchCommand item) => throw null; - /// + /// public override void Add(System.Data.Common.DbBatchCommand item) => throw null; /// public override void Clear() => throw null; - /// + /// public bool Contains(Microsoft.Data.SqlClient.SqlBatchCommand item) => throw null; - /// + /// public override bool Contains(System.Data.Common.DbBatchCommand item) => throw null; - /// + /// public void CopyTo(Microsoft.Data.SqlClient.SqlBatchCommand[] array, int arrayIndex) => throw null; - /// + /// public override void CopyTo(System.Data.Common.DbBatchCommand[] array, int arrayIndex) => throw null; - /// + /// public int IndexOf(Microsoft.Data.SqlClient.SqlBatchCommand item) => throw null; - /// + /// public override int IndexOf(System.Data.Common.DbBatchCommand item) => throw null; - /// + /// public void Insert(int index, Microsoft.Data.SqlClient.SqlBatchCommand item) => throw null; - /// + /// public override void Insert(int index, System.Data.Common.DbBatchCommand item) => throw null; - /// + /// public bool Remove(Microsoft.Data.SqlClient.SqlBatchCommand item) => throw null; - /// + /// public override bool Remove(System.Data.Common.DbBatchCommand item) => throw null; /// public override void RemoveAt(int index) => throw null; @@ -116,9 +114,9 @@ public class SqlBatchCommandCollection : System.Data.Common.DbBatchCommandCollec /// public new Microsoft.Data.SqlClient.SqlBatchCommand this[int index] { get => throw null; set { } } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; - /// + /// protected override System.Data.Common.DbBatchCommand GetBatchCommand(int index) => throw null; - /// + /// protected override void SetBatchCommand(int index, System.Data.Common.DbBatchCommand batchCommand) => throw null; } /// diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBatchCommandCollection.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBatchCommandCollection.cs index 7e0d4e91bc..939c8d8de3 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBatchCommandCollection.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBatchCommandCollection.cs @@ -9,7 +9,6 @@ namespace Microsoft.Data.SqlClient { - /// /// public class SqlBatchCommandCollection : DbBatchCommandCollection, IList { @@ -23,39 +22,38 @@ internal SqlBatchCommandCollection(List batchCommands) public override int Count => _list.Count; /// public override bool IsReadOnly => false; - /// IEnumerator IEnumerable.GetEnumerator() => _list.GetEnumerator(); - /// + /// public override IEnumerator GetEnumerator() => _list.GetEnumerator(); - /// + /// public void Add(SqlBatchCommand item) => _list.Add(item); - /// + /// public override void Add(DbBatchCommand item) => Add((SqlBatchCommand)item); /// public override void Clear() => _list.Clear(); - /// + /// public bool Contains(SqlBatchCommand item) => _list.Contains(item); - /// + /// public override bool Contains(DbBatchCommand item) => Contains((SqlBatchCommand)item); - /// + /// public void CopyTo(SqlBatchCommand[] array, int arrayIndex) => _list.CopyTo(array, arrayIndex); - /// + /// public override void CopyTo(DbBatchCommand[] array, int arrayIndex) { SqlBatchCommand[] target = (SqlBatchCommand[])array; CopyTo(target, arrayIndex); } - /// + /// public int IndexOf(SqlBatchCommand item) => _list.IndexOf(item); - /// + /// public override int IndexOf(DbBatchCommand item) => IndexOf((SqlBatchCommand)item); - /// + /// public void Insert(int index, SqlBatchCommand item) => _list.Insert(index, item); - /// + /// public override void Insert(int index, DbBatchCommand item) => Insert(index, (SqlBatchCommand)item); - /// + /// public bool Remove(SqlBatchCommand item) => _list.Remove(item); - /// + /// public override bool Remove(DbBatchCommand item) => Remove((SqlBatchCommand)item); /// public override void RemoveAt(int index) => _list.RemoveAt(index); @@ -71,10 +69,9 @@ SqlBatchCommand IList.this[int index] get => _list[index]; set => _list[index] = value; } - /// + /// protected override DbBatchCommand GetBatchCommand(int index) => _list[index]; - - /// + /// protected override void SetBatchCommand(int index, DbBatchCommand batchCommand) => _list[index] = (SqlBatchCommand)batchCommand; }