Skip to content

Commit b36d69e

Browse files
committed
Remove redundant SmiRecordBuffer class
1 parent 609f63b commit b36d69e

File tree

6 files changed

+9
-28
lines changed

6 files changed

+9
-28
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,6 @@
432432
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiMetaDataProperty.cs">
433433
<Link>Microsoft\Data\SqlClient\Server\SmiMetaDataProperty.cs</Link>
434434
</Compile>
435-
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiRecordBuffer.cs">
436-
<Link>Microsoft\Data\SqlClient\Server\SmiRecordBuffer.cs</Link>
437-
</Compile>
438435
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiSettersStream.cs">
439436
<Link>Microsoft\Data\SqlClient\Server\SmiSettersStream.cs</Link>
440437
</Compile>

src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,6 @@
543543
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiMetaDataProperty.cs">
544544
<Link>Microsoft\Data\SqlClient\Server\SmiMetaDataProperty.cs</Link>
545545
</Compile>
546-
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiRecordBuffer.cs">
547-
<Link>Microsoft\Data\SqlClient\Server\SmiRecordBuffer.cs</Link>
548-
</Compile>
549546
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiSettersStream.cs">
550547
<Link>Microsoft\Data\SqlClient\Server\SmiSettersStream.cs</Link>
551548
</Compile>

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/MemoryRecordBuffer.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Microsoft.Data.SqlClient.Server
1010
{
1111
// Class for implementing a record object used in out-of-proc scenarios.
12-
internal sealed class MemoryRecordBuffer : SmiRecordBuffer
12+
internal sealed class MemoryRecordBuffer : SmiTypedGetterSetter
1313
{
1414
private SqlRecordBuffer[] _buffer;
1515

@@ -25,6 +25,12 @@ internal MemoryRecordBuffer(SmiMetaData[] metaData)
2525
}
2626
}
2727

28+
#region Read/Write
29+
protected override bool CanGet => true;
30+
31+
protected override bool CanSet => true;
32+
#endregion
33+
2834
#region Getters
2935
// Null test
3036
// valid for all types

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SmiRecordBuffer.cs

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlDataRecord.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Microsoft.Data.SqlClient.Server
1414
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlDataRecord.xml' path='docs/members[@name="SqlDataRecord"]/SqlDataRecord/*' />
1515
public partial class SqlDataRecord : IDataRecord
1616
{
17-
private readonly SmiRecordBuffer _recordBuffer;
17+
private readonly MemoryRecordBuffer _recordBuffer;
1818
private readonly SmiExtendedMetaData[] _columnSmiMetaData;
1919
private readonly SqlMetaData[] _columnMetaData;
2020
private FieldNameLookup _fieldNameLookup;

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsRecordBufferSetter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
namespace Microsoft.Data.SqlClient
1212
{
1313
// TdsRecordBufferSetter handles writing a structured value out to a TDS stream
14-
internal class TdsRecordBufferSetter : SmiRecordBuffer
14+
internal class TdsRecordBufferSetter : SmiTypedGetterSetter
1515
{
1616
#region Fields (private)
1717

0 commit comments

Comments
 (0)