Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge AAsyncCallContext, cleanup for SqlDataReader merge #2383

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@
<Compile Include="..\..\src\Microsoft\Data\Sql\SqlNotificationRequest.cs">
<Link>Microsoft\Data\Sql\SqlNotificationRequest.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\AAsyncCallContext.cs">
<Link>Microsoft\Data\SqlClient\AAsyncCallContext.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\ActiveDirectoryAuthenticationProvider.cs">
<Link>Microsoft\Data\SqlClient\ActiveDirectoryAuthenticationProvider.cs</Link>
</Compile>
Expand Down Expand Up @@ -627,7 +630,6 @@
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionInternal.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPool.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.cs" />
<Compile Include="Microsoft\Data\SqlClient\AAsyncCallContext.cs" />
<Compile Include="Microsoft\Data\SqlClient\AlwaysEncryptedHelperClasses.cs" />
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.cs" />
<Compile Include="Microsoft\Data\SqlClient\Reliability\SqlConfigurableRetryLogicManager.NetCoreApp.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2583,7 +2583,7 @@ private object GetSqlValueFromSqlBufferInternal(SqlBuffer data, _SqlMetaData met
}
else
{
throw ADP.DataReaderClosed(nameof(GetSqlValueFromSqlBufferInternal));
throw ADP.DataReaderClosed();
}
}
else
Expand Down Expand Up @@ -2783,7 +2783,7 @@ private object GetValueFromSqlBufferInternal(SqlBuffer data, _SqlMetaData metaDa
}
else
{
throw ADP.DataReaderClosed(nameof(GetValueFromSqlBufferInternal));
throw ADP.DataReaderClosed();
}
}
}
Expand Down Expand Up @@ -3896,7 +3896,6 @@ internal bool TryReadColumnInternal(int i, bool readHeaderOnly = false, bool for
}
else
{
// we have read past the column somehow, this is an error
Debug.Assert(false, "We have read past the column somehow, this is an error");
}
}
Expand Down Expand Up @@ -5111,7 +5110,7 @@ override public Task<T> GetFieldValueAsync<T>(int i, CancellationToken cancellat
var metaData = _metaData;
if ((data != null) && (metaData != null))
{
return Task.FromResult<T>(GetFieldValueFromSqlBufferInternal<T>(data[i], metaData[i], isAsync:false));
return Task.FromResult<T>(GetFieldValueFromSqlBufferInternal<T>(data[i], metaData[i], isAsync: false));
}
else
{
Expand Down Expand Up @@ -5151,7 +5150,7 @@ override public Task<T> GetFieldValueAsync<T>(int i, CancellationToken cancellat
{
_stateObj._shouldHaveEnoughData = true;
#endif
return Task.FromResult(GetFieldValueInternal<T>(i, isAsync:true));
return Task.FromResult(GetFieldValueInternal<T>(i, isAsync: true));
#if DEBUG
}
finally
Expand Down Expand Up @@ -5225,7 +5224,7 @@ private static Task<T> GetFieldValueAsyncExecute<T>(Task task, object state)

if (reader.TryReadColumn(columnIndex, setTimeout: false))
{
return Task.FromResult<T>(reader.GetFieldValueFromSqlBufferInternal<T>(reader._data[columnIndex], reader._metaData[columnIndex], isAsync:false));
return Task.FromResult<T>(reader.GetFieldValueFromSqlBufferInternal<T>(reader._data[columnIndex], reader._metaData[columnIndex], isAsync: false));
}
else
{
Expand Down Expand Up @@ -5591,7 +5590,7 @@ private void CompleteAsyncCall<T>(Task<T> task, SqlDataReaderBaseAsyncCallContex
}


internal class Snapshot
internal sealed class Snapshot
{
public bool _dataReady;
public bool _haltRead;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@
<Compile Include="..\..\src\Microsoft\Data\Sql\SqlNotificationRequest.cs">
<Link>Microsoft\Data\Sql\SqlNotificationRequest.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\AAsyncCallContext.cs">
<Link>Microsoft\Data\SqlClient\AAsyncCallContext.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\ActiveDirectoryAuthenticationTimeoutRetryHelper.cs">
<Link>Microsoft\Data\SqlClient\ActiveDirectoryAuthenticationTimeoutRetryHelper.cs</Link>
</Compile>
Expand Down
Loading
Loading