Skip to content

Commit 3386b39

Browse files
committed
Changed accessibility modifiers and names of merged classes
1 parent 4e6da43 commit 3386b39

26 files changed

+1650
-1650
lines changed

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

Lines changed: 49 additions & 49 deletions
Large diffs are not rendered by default.

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

Lines changed: 102 additions & 102 deletions
Large diffs are not rendered by default.

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,16 +2458,16 @@ private Assembly ResolveTypeAssembly(AssemblyName asmRef, bool throwOnError)
24582458

24592459
internal void CheckGetExtendedUDTInfo(SqlMetaDataPriv metaData, bool fThrow)
24602460
{
2461-
if (metaData.udt?._type == null)
2461+
if (metaData.Udt?.Type == null)
24622462
{ // If null, we have not obtained extended info.
2463-
Debug.Assert(!string.IsNullOrEmpty(metaData.udt?._assemblyQualifiedName), "Unexpected state on GetUDTInfo");
2463+
Debug.Assert(!string.IsNullOrEmpty(metaData.Udt?.AssemblyQualifiedName), "Unexpected state on GetUDTInfo");
24642464
// Parameter throwOnError determines whether exception from Assembly.Load is thrown.
2465-
metaData.udt._type =
2466-
Type.GetType(typeName: metaData.udt._assemblyQualifiedName, assemblyResolver: asmRef => ResolveTypeAssembly(asmRef, fThrow), typeResolver: null, throwOnError: fThrow);
2465+
metaData.Udt.Type =
2466+
Type.GetType(typeName: metaData.Udt.AssemblyQualifiedName, assemblyResolver: asmRef => ResolveTypeAssembly(asmRef, fThrow), typeResolver: null, throwOnError: fThrow);
24672467

2468-
if (fThrow && metaData.udt._type == null)
2468+
if (fThrow && metaData.Udt.Type == null)
24692469
{
2470-
throw SQL.UDTUnexpectedResult(metaData.udt._assemblyQualifiedName);
2470+
throw SQL.UDTUnexpectedResult(metaData.Udt.AssemblyQualifiedName);
24712471
}
24722472
}
24732473
}
@@ -2484,7 +2484,7 @@ internal object GetUdtValue(object value, SqlMetaDataPriv metaData, bool returnD
24842484
// Since the serializer doesn't handle nulls...
24852485
if (ADP.IsNull(value))
24862486
{
2487-
Type t = metaData.udt?._type;
2487+
Type t = metaData.Udt?.Type;
24882488
Debug.Assert(t != null, "Unexpected null of udtType on GetUdtValue!");
24892489
o = t.InvokeMember("Null", BindingFlags.Public | BindingFlags.GetProperty | BindingFlags.Static, null, null, Array.Empty<object>(), CultureInfo.InvariantCulture);
24902490
Debug.Assert(o != null);
@@ -2495,7 +2495,7 @@ internal object GetUdtValue(object value, SqlMetaDataPriv metaData, bool returnD
24952495

24962496
MemoryStream stm = new MemoryStream((byte[])value);
24972497

2498-
o = Server.SerializationHelperSql9.Deserialize(stm, metaData.udt?._type);
2498+
o = Server.SerializationHelperSql9.Deserialize(stm, metaData.Udt?.Type);
24992499

25002500
Debug.Assert(o != null, "object could NOT be created");
25012501
return o;

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

Lines changed: 197 additions & 197 deletions
Large diffs are not rendered by default.

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ internal SqlDbColumn(_SqlMetaData md)
2121
private void Populate()
2222
{
2323
AllowDBNull = _metadata.IsNullable;
24-
BaseCatalogName = _metadata.catalogName;
25-
BaseColumnName = _metadata._baseColumn;
26-
BaseSchemaName = _metadata.schemaName;
27-
BaseServerName = _metadata.serverName;
28-
BaseTableName = _metadata.tableName;
29-
ColumnName = _metadata._column;
30-
ColumnOrdinal = _metadata._ordinal;
31-
ColumnSize = (_metadata._metaType.IsSizeInCharacters && (_metadata._length != 0x7fffffff)) ? (_metadata._length / 2) : _metadata._length;
24+
BaseCatalogName = _metadata.CatalogName;
25+
BaseColumnName = _metadata.BaseColumn;
26+
BaseSchemaName = _metadata.SchemaName;
27+
BaseServerName = _metadata.ServerName;
28+
BaseTableName = _metadata.TableName;
29+
ColumnName = _metadata.Column;
30+
ColumnOrdinal = _metadata.Ordinal;
31+
ColumnSize = (_metadata.MetaType.IsSizeInCharacters && (_metadata.Length != 0x7fffffff)) ? (_metadata.Length / 2) : _metadata.Length;
3232
IsAutoIncrement = _metadata.IsIdentity;
3333
IsIdentity = _metadata.IsIdentity;
34-
IsLong = _metadata._metaType.IsLong;
34+
IsLong = _metadata.MetaType.IsLong;
3535

36-
if (SqlDbType.Timestamp == _metadata._type)
36+
if (SqlDbType.Timestamp == _metadata.Type)
3737
{
3838
IsUnique = true;
3939
}
@@ -42,18 +42,18 @@ private void Populate()
4242
IsUnique = false;
4343
}
4444

45-
if (TdsEnums.UNKNOWN_PRECISION_SCALE != _metadata._precision)
45+
if (TdsEnums.UNKNOWN_PRECISION_SCALE != _metadata.Precision)
4646
{
47-
NumericPrecision = _metadata._precision;
47+
NumericPrecision = _metadata.Precision;
4848
}
4949
else
5050
{
51-
NumericPrecision = _metadata._metaType.Precision;
51+
NumericPrecision = _metadata.MetaType.Precision;
5252
}
5353

5454
IsReadOnly = _metadata.IsReadOnly;
5555

56-
UdtAssemblyQualifiedName = _metadata.udt?._assemblyQualifiedName;
56+
UdtAssemblyQualifiedName = _metadata.Udt?.AssemblyQualifiedName;
5757

5858
}
5959

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

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,8 @@ public override string ServerVersion
698698
{
699699
get
700700
{
701-
return (string.Format("{0:00}.{1:00}.{2:0000}", _loginAck._majorVersion,
702-
(short)_loginAck._minorVersion, _loginAck._buildNum));
701+
return (string.Format("{0:00}.{1:00}.{2:0000}", _loginAck.MajorVersion,
702+
(short)_loginAck.MinorVersion, _loginAck.BuildNum));
703703
}
704704
}
705705

@@ -722,7 +722,7 @@ protected override bool UnbindOnTransactionCompletion
722722
/// <summary>
723723
/// Validates if federated authentication is used, Access Token used by this connection is active for the value of 'accessTokenExpirationBufferTime'.
724724
/// </summary>
725-
internal override bool IsAccessTokenExpired => _federatedAuthenticationInfoRequested && DateTime.FromFileTimeUtc(_fedAuthToken._expirationFileTime) < DateTime.UtcNow.AddSeconds(accessTokenExpirationBufferTime);
725+
internal override bool IsAccessTokenExpired => _federatedAuthenticationInfoRequested && DateTime.FromFileTimeUtc(_fedAuthToken.ExpirationFileTime) < DateTime.UtcNow.AddSeconds(accessTokenExpirationBufferTime);
726726

727727
////////////////////////////////////////////////////////////////////////////////////////
728728
// GENERAL METHODS
@@ -1278,37 +1278,37 @@ private void Login(ServerInfo server, TimeoutTimer timeout, string newPassword,
12781278
}
12791279
}
12801280

1281-
login._authentication = ConnectionOptions.Authentication;
1282-
login._timeout = timeoutInSeconds;
1283-
login._userInstance = ConnectionOptions.UserInstance;
1284-
login._hostName = ConnectionOptions.ObtainWorkstationId();
1285-
login._userName = ConnectionOptions.UserID;
1286-
login._password = ConnectionOptions.Password;
1287-
login._applicationName = ConnectionOptions.ApplicationName;
1281+
login.Authentication = ConnectionOptions.Authentication;
1282+
login.Timeout = timeoutInSeconds;
1283+
login.UserInstance = ConnectionOptions.UserInstance;
1284+
login.HostName = ConnectionOptions.ObtainWorkstationId();
1285+
login.UserName = ConnectionOptions.UserID;
1286+
login.Password = ConnectionOptions.Password;
1287+
login.ApplicationName = ConnectionOptions.ApplicationName;
12881288

1289-
login._language = _currentLanguage;
1290-
if (!login._userInstance)
1289+
login.Language = _currentLanguage;
1290+
if (!login.UserInstance)
12911291
{
12921292
// Do not send attachdbfilename or database to SSE primary instance
1293-
login._database = CurrentDatabase;
1294-
login._attachDBFilename = ConnectionOptions.AttachDBFilename;
1293+
login.Database = CurrentDatabase;
1294+
login.AttachDbFilename = ConnectionOptions.AttachDBFilename;
12951295
}
12961296

12971297
// VSTS#795621 - Ensure ServerName is Sent During TdsLogin To Enable Sql Azure Connectivity.
12981298
// Using server.UserServerName (versus ConnectionOptions.DataSource) since TdsLogin requires
12991299
// serverName to always be non-null.
1300-
login._serverName = server.UserServerName;
1300+
login.ServerName = server.UserServerName;
13011301

1302-
login._useReplication = ConnectionOptions.Replication;
1303-
login._useSSPI = ConnectionOptions.IntegratedSecurity // Treat AD Integrated like Windows integrated when against a non-FedAuth endpoint
1302+
login.UseReplication = ConnectionOptions.Replication;
1303+
login.UseSspi = ConnectionOptions.IntegratedSecurity // Treat AD Integrated like Windows integrated when against a non-FedAuth endpoint
13041304
|| (ConnectionOptions.Authentication == SqlAuthenticationMethod.ActiveDirectoryIntegrated && !_fedAuthRequired);
1305-
login._packetSize = _currentPacketSize;
1306-
login._newPassword = newPassword;
1307-
login._readOnlyIntent = ConnectionOptions.ApplicationIntent == ApplicationIntent.ReadOnly;
1308-
login._credential = _credential;
1305+
login.PacketSize = _currentPacketSize;
1306+
login.NewPassword = newPassword;
1307+
login.ReadOnlyIntent = ConnectionOptions.ApplicationIntent == ApplicationIntent.ReadOnly;
1308+
login.Credential = _credential;
13091309
if (newSecurePassword != null)
13101310
{
1311-
login._newSecurePassword = newSecurePassword;
1311+
login.NewSecurePassword = newSecurePassword;
13121312
}
13131313

13141314
TdsEnums.FeatureExtension requestedFeatures = TdsEnums.FeatureExtension.None;
@@ -1338,9 +1338,9 @@ private void Login(ServerInfo server, TimeoutTimer timeout, string newPassword,
13381338
_fedAuthFeatureExtensionData =
13391339
new FederatedAuthenticationFeatureExtensionData
13401340
{
1341-
_libraryType = TdsEnums.FedAuthLibrary.MSAL,
1342-
_authentication = ConnectionOptions.Authentication,
1343-
_fedAuthRequiredPreLoginResponse = _fedAuthRequired
1341+
LibraryType = TdsEnums.FedAuthLibrary.MSAL,
1342+
Authentication = ConnectionOptions.Authentication,
1343+
FedAuthRequiredPreLoginResponse = _fedAuthRequired
13441344
};
13451345
}
13461346

@@ -1349,9 +1349,9 @@ private void Login(ServerInfo server, TimeoutTimer timeout, string newPassword,
13491349
requestedFeatures |= TdsEnums.FeatureExtension.FedAuth;
13501350
_fedAuthFeatureExtensionData = new FederatedAuthenticationFeatureExtensionData
13511351
{
1352-
_libraryType = TdsEnums.FedAuthLibrary.SecurityToken,
1353-
_fedAuthRequiredPreLoginResponse = _fedAuthRequired,
1354-
_accessToken = _accessTokenInBytes
1352+
LibraryType = TdsEnums.FedAuthLibrary.SecurityToken,
1353+
FedAuthRequiredPreLoginResponse = _fedAuthRequired,
1354+
AccessToken = _accessTokenInBytes
13551355
};
13561356
// No need any further info from the server for token based authentication. So set _federatedAuthenticationRequested to true
13571357
_federatedAuthenticationRequested = true;
@@ -2134,14 +2134,14 @@ internal void OnLoginAck(SqlLoginAck rec)
21342134
_loginAck = rec;
21352135
if (_recoverySessionData != null)
21362136
{
2137-
if (_recoverySessionData._tdsVersion != rec._tdsVersion)
2137+
if (_recoverySessionData._tdsVersion != rec.TdsVersion)
21382138
{
21392139
throw SQL.CR_TDSVersionNotPreserved(this);
21402140
}
21412141
}
21422142
if (_currentSessionData != null)
21432143
{
2144-
_currentSessionData._tdsVersion = rec._tdsVersion;
2144+
_currentSessionData._tdsVersion = rec.TdsVersion;
21452145
}
21462146
}
21472147

@@ -2179,7 +2179,7 @@ internal void OnFedAuthInfo(SqlFedAuthInfo fedAuthInfo)
21792179
Debug.Assert(_dbConnectionPool.AuthenticationContexts != null);
21802180

21812181
// Construct the dbAuthenticationContextKey with information from FedAuthInfo and store for later use, when inserting in to the token cache.
2182-
_dbConnectionPoolAuthenticationContextKey = new DbConnectionPoolAuthenticationContextKey(fedAuthInfo._stsurl, fedAuthInfo._spn);
2182+
_dbConnectionPoolAuthenticationContextKey = new DbConnectionPoolAuthenticationContextKey(fedAuthInfo.StsUrl, fedAuthInfo.Spn);
21832183

21842184
// Try to retrieve the authentication context from the pool, if one does exist for this key.
21852185
if (_dbConnectionPool.AuthenticationContexts.TryGetValue(_dbConnectionPoolAuthenticationContextKey, out dbConnectionPoolAuthenticationContext))
@@ -2272,11 +2272,11 @@ internal void OnFedAuthInfo(SqlFedAuthInfo fedAuthInfo)
22722272

22732273
// If the code flow is here, then we are re-using the context from the cache for this connection attempt and not
22742274
// generating a new access token on this thread.
2275-
_fedAuthToken._accessToken = dbConnectionPoolAuthenticationContext.AccessToken;
2276-
_fedAuthToken._expirationFileTime = dbConnectionPoolAuthenticationContext.ExpirationTime.ToFileTime();
2275+
_fedAuthToken.AccessToken = dbConnectionPoolAuthenticationContext.AccessToken;
2276+
_fedAuthToken.ExpirationFileTime = dbConnectionPoolAuthenticationContext.ExpirationTime.ToFileTime();
22772277
}
22782278

2279-
Debug.Assert(_fedAuthToken != null && _fedAuthToken._accessToken != null, "fedAuthToken and fedAuthToken.accessToken cannot be null.");
2279+
Debug.Assert(_fedAuthToken != null && _fedAuthToken.AccessToken != null, "fedAuthToken and fedAuthToken.accessToken cannot be null.");
22802280
_parser.SendFedAuthToken(_fedAuthToken);
22812281
}
22822282

@@ -2374,8 +2374,8 @@ internal SqlFedAuthToken GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
23742374
{
23752375
var authParamsBuilder = new SqlAuthenticationParameters.Builder(
23762376
authenticationMethod: ConnectionOptions.Authentication,
2377-
resource: fedAuthInfo._spn,
2378-
authority: fedAuthInfo._stsurl,
2377+
resource: fedAuthInfo.Spn,
2378+
authority: fedAuthInfo.StsUrl,
23792379
serverName: ConnectionOptions.DataSource,
23802380
databaseName: ConnectionOptions.InitialCatalog)
23812381
.WithConnectionId(_clientConnectionId)
@@ -2482,7 +2482,7 @@ internal SqlFedAuthToken GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
24822482
break;
24832483
}
24842484

2485-
Debug.Assert(_fedAuthToken._accessToken != null, "AccessToken should not be null.");
2485+
Debug.Assert(_fedAuthToken.AccessToken != null, "AccessToken should not be null.");
24862486
#if DEBUG
24872487
if (_forceMsalRetry)
24882488
{
@@ -2569,13 +2569,13 @@ internal SqlFedAuthToken GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
25692569
}
25702570

25712571
Debug.Assert(_fedAuthToken != null, "fedAuthToken should not be null.");
2572-
Debug.Assert(_fedAuthToken._accessToken != null && _fedAuthToken._accessToken.Length > 0, "fedAuthToken.accessToken should not be null or empty.");
2572+
Debug.Assert(_fedAuthToken.AccessToken != null && _fedAuthToken.AccessToken.Length > 0, "fedAuthToken.accessToken should not be null or empty.");
25732573

25742574
// Store the newly generated token in _newDbConnectionPoolAuthenticationContext, only if using pooling.
25752575
if (_dbConnectionPool != null)
25762576
{
2577-
DateTime expirationTime = DateTime.FromFileTimeUtc(_fedAuthToken._expirationFileTime);
2578-
_newDbConnectionPoolAuthenticationContext = new DbConnectionPoolAuthenticationContext(_fedAuthToken._accessToken, expirationTime);
2577+
DateTime expirationTime = DateTime.FromFileTimeUtc(_fedAuthToken.ExpirationFileTime);
2578+
_newDbConnectionPoolAuthenticationContext = new DbConnectionPoolAuthenticationContext(_fedAuthToken.AccessToken, expirationTime);
25792579
}
25802580
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlInternalConnectionTds.GetFedAuthToken> {0}, Finished generating federated authentication token.", ObjectID);
25812581
return _fedAuthToken;
@@ -2667,7 +2667,7 @@ internal void OnFeatureExtAck(int featureId, byte[] data)
26672667

26682668
Debug.Assert(_fedAuthFeatureExtensionData != null, "_fedAuthFeatureExtensionData must not be null when _federatedAuthenticationRequested == true");
26692669

2670-
switch (_fedAuthFeatureExtensionData._libraryType)
2670+
switch (_fedAuthFeatureExtensionData.LibraryType)
26712671
{
26722672
case TdsEnums.FedAuthLibrary.MSAL:
26732673
case TdsEnums.FedAuthLibrary.SecurityToken:
@@ -2682,7 +2682,7 @@ internal void OnFeatureExtAck(int featureId, byte[] data)
26822682
default:
26832683
Debug.Fail("Unknown _fedAuthLibrary type");
26842684
SqlClientEventSource.Log.TryTraceEvent("<sc.SqlInternalConnectionTds.OnFeatureExtAck|ERR> {0}, Attempting to use unknown federated authentication library", ObjectID);
2685-
throw SQL.ParsingErrorLibraryType(ParsingErrorState.FedAuthFeatureAckUnknownLibraryType, (int)_fedAuthFeatureExtensionData._libraryType);
2685+
throw SQL.ParsingErrorLibraryType(ParsingErrorState.FedAuthFeatureAckUnknownLibraryType, (int)_fedAuthFeatureExtensionData.LibraryType);
26862686
}
26872687
_federatedAuthenticationAcknowledged = true;
26882688

0 commit comments

Comments
 (0)