Skip to content

Commit bdde88e

Browse files
edwardnealbenrr101
authored andcommitted
Remove unnecessary assignments
1 parent 27c540d commit bdde88e

File tree

4 files changed

+2
-16
lines changed

4 files changed

+2
-16
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,7 @@ private object ConvertValue(object value, _SqlMetaData metadata, bool isNull, re
16201620
// in byte[] form.
16211621
if (!(value is byte[]))
16221622
{
1623-
value = _connection.GetBytes(value);
1623+
value = _connection.GetBytes(value, out _, out _);
16241624
typeChanged = true;
16251625
}
16261626
break;

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ public string AccessToken
687687
{
688688
get
689689
{
690-
string result = _accessToken;
691690
// When a connection is connecting or is ever opened, make AccessToken available only if "Persist Security Info" is set to true
692691
// otherwise, return null
693692
SqlConnectionString connectionOptions = (SqlConnectionString)UserConnectionOptions;
@@ -2545,12 +2544,6 @@ internal object GetUdtValue(object value, SqlMetaDataPriv metaData, bool returnD
25452544
}
25462545
}
25472546

2548-
internal byte[] GetBytes(object o)
2549-
{
2550-
Format format = Format.Native;
2551-
return GetBytes(o, out format, out int maxSize);
2552-
}
2553-
25542547
internal byte[] GetBytes(object o, out Format format, out int maxSize)
25552548
{
25562549
SqlUdtInfo attr = GetInfoFromType(o.GetType());

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ private object ConvertValue(object value, _SqlMetaData metadata, bool isNull, re
16341634
// in byte[] form.
16351635
if (!(value is byte[]))
16361636
{
1637-
value = _connection.GetBytes(value);
1637+
value = _connection.GetBytes(value, out _, out _);
16381638
typeChanged = true;
16391639
}
16401640
break;

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlConnection.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,6 @@ public string AccessToken
710710
{
711711
get
712712
{
713-
string result = _accessToken;
714713
// When a connection is connecting or is ever opened, make AccessToken available only if "Persist Security Info" is set to true
715714
// otherwise, return null
716715
SqlConnectionString connectionOptions = (SqlConnectionString)UserConnectionOptions;
@@ -2555,12 +2554,6 @@ internal object GetUdtValue(object value, SqlMetaDataPriv metaData, bool returnD
25552554
}
25562555
}
25572556

2558-
internal byte[] GetBytes(object o)
2559-
{
2560-
Format format = Format.Native;
2561-
return GetBytes(o, out format, out int maxSize);
2562-
}
2563-
25642557
internal byte[] GetBytes(object o, out Format format, out int maxSize)
25652558
{
25662559
SqlUdtInfo attr = GetInfoFromType(o.GetType());

0 commit comments

Comments
 (0)