Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,6 @@
<ItemGroup>
<Compile Include="Microsoft\Data\Common\DbConnectionOptions.cs" />
<Compile Include="Microsoft\Data\Common\DbConnectionString.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlBuffer.netfx.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlBulkCopy.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlClientWrapperSmiStream.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlClientWrapperSmiStreamChars.cs" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Microsoft.Data.SqlClient
{
internal sealed partial class SqlBuffer
internal sealed class SqlBuffer
{
internal enum StorageType
{
Expand Down Expand Up @@ -1238,6 +1238,17 @@ internal void Clear()
_object = null;
}

#if NETFRAMEWORK
internal void SetToDate(DateTime date)
{
Debug.Assert(IsEmpty, "setting value a second time?");

_type = StorageType.Date;
_value._int32 = date.Subtract(DateTime.MinValue).Days;
_isNull = false;
}
#endif

internal void SetToDateTime(int daypart, int timepart)
{
Debug.Assert(IsEmpty, "setting value a second time?");
Expand All @@ -1246,6 +1257,19 @@ internal void SetToDateTime(int daypart, int timepart)
_type = StorageType.DateTime;
_isNull = false;
}

#if NETFRAMEWORK
internal void SetToDateTime2(DateTime dateTime, byte scale)
{
Debug.Assert(IsEmpty, "setting value a second time?");

_type = StorageType.DateTime2;
_value._dateTime2Info._timeInfo._ticks = dateTime.TimeOfDay.Ticks;
_value._dateTime2Info._timeInfo._scale = scale;
_value._dateTime2Info._date = dateTime.Subtract(DateTime.MinValue).Days;
_isNull = false;
}
#endif

internal void SetToDecimal(byte precision, byte scale, bool positive, int[] bits)
{
Expand Down
Loading