Skip to content

Commit 44e9ae5

Browse files
committed
Remove now-unused resource strings
1 parent 1437afc commit 44e9ae5

File tree

5 files changed

+4
-454
lines changed

5 files changed

+4
-454
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,11 +1988,7 @@ internal TdsParser Parser
19881988
{
19891989
get
19901990
{
1991-
SqlInternalConnectionTds tdsConnection = (GetOpenConnection() as SqlInternalConnectionTds);
1992-
if (tdsConnection == null)
1993-
{
1994-
throw SQL.NotAvailableOnContextConnection();
1995-
}
1991+
SqlInternalConnectionTds tdsConnection = GetOpenTdsConnection();
19961992
return tdsConnection.Parser;
19971993
}
19981994
}

src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,14 +1455,6 @@ internal static ArgumentException InvalidValue(string parameterName)
14551455
{
14561456
return Argument(StringsHelper.GetString(Strings.ADP_InvalidValue), parameterName);
14571457
}
1458-
internal static ArgumentException InvalidMixedArgumentOfSecureCredentialAndContextConnection()
1459-
{
1460-
return ADP.Argument(StringsHelper.GetString(Strings.ADP_InvalidMixedUsageOfSecureCredentialAndContextConnection));
1461-
}
1462-
internal static InvalidOperationException InvalidMixedUsageOfAccessTokenAndContextConnection()
1463-
{
1464-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.ADP_InvalidMixedUsageOfAccessTokenAndContextConnection));
1465-
}
14661458
internal static Exception InvalidMixedUsageOfAccessTokenAndCredential()
14671459
{
14681460
return ADP.InvalidOperation(StringsHelper.GetString(Strings.ADP_InvalidMixedUsageOfAccessTokenAndCredential));

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUtil.cs

Lines changed: 1 addition & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,11 +1073,6 @@ internal static TransactionPromotionException PromotionFailed(Exception inner)
10731073
return e;
10741074
}
10751075

1076-
internal static Exception SqlDepCannotBeCreatedInProc()
1077-
{
1078-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SqlNotify_SqlDepCannotBeCreatedInProc));
1079-
}
1080-
10811076
static internal Exception SqlNotificationException(SqlNotificationEventArgs notify)
10821077
{
10831078
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQLNotify_ErrorFormat, notify.Type, notify.Info, notify.Source));
@@ -1165,77 +1160,6 @@ internal static Exception IEnumerableOfSqlDataRecordHasNoRows()
11651160
return ADP.Argument(StringsHelper.GetString(Strings.IEnumerableOfSqlDataRecordHasNoRows));
11661161
}
11671162

1168-
//
1169-
// SqlPipe
1170-
//
1171-
internal static Exception SqlPipeCommandHookedUpToNonContextConnection()
1172-
{
1173-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SqlPipe_CommandHookedUpToNonContextConnection));
1174-
}
1175-
1176-
internal static Exception SqlPipeMessageTooLong(int messageLength)
1177-
{
1178-
return ADP.Argument(StringsHelper.GetString(Strings.SqlPipe_MessageTooLong, messageLength));
1179-
}
1180-
1181-
internal static Exception SqlPipeIsBusy()
1182-
{
1183-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SqlPipe_IsBusy));
1184-
}
1185-
1186-
internal static Exception SqlPipeAlreadyHasAnOpenResultSet(string methodName)
1187-
{
1188-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SqlPipe_AlreadyHasAnOpenResultSet, methodName));
1189-
}
1190-
1191-
internal static Exception SqlPipeDoesNotHaveAnOpenResultSet(string methodName)
1192-
{
1193-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SqlPipe_DoesNotHaveAnOpenResultSet, methodName));
1194-
}
1195-
1196-
//
1197-
// : ISqlResultSet
1198-
//
1199-
internal static Exception SqlResultSetClosed(string methodname)
1200-
{
1201-
if (methodname == null)
1202-
{
1203-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_SqlResultSetClosed2));
1204-
}
1205-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_SqlResultSetClosed, methodname));
1206-
}
1207-
internal static Exception SqlResultSetNoData(string methodname)
1208-
{
1209-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.ADP_DataReaderNoData, methodname));
1210-
}
1211-
internal static Exception SqlRecordReadOnly(string methodname)
1212-
{
1213-
if (methodname == null)
1214-
{
1215-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_SqlRecordReadOnly2));
1216-
}
1217-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_SqlRecordReadOnly, methodname));
1218-
}
1219-
1220-
internal static Exception SqlResultSetRowDeleted(string methodname)
1221-
{
1222-
if (methodname == null)
1223-
{
1224-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_SqlResultSetRowDeleted2));
1225-
}
1226-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_SqlResultSetRowDeleted, methodname));
1227-
}
1228-
1229-
internal static Exception SqlResultSetCommandNotInSameConnection()
1230-
{
1231-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_SqlResultSetCommandNotInSameConnection));
1232-
}
1233-
1234-
internal static Exception SqlResultSetNoAcceptableCursor()
1235-
{
1236-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_SqlResultSetNoAcceptableCursor));
1237-
}
1238-
12391163
//
12401164
// SQL.BulkLoad
12411165
//
@@ -1607,10 +1531,6 @@ internal static Exception UnsupportedFeatureAndToken(SqlInternalConnectionTds in
16071531
return exc;
16081532
}
16091533

1610-
internal static Exception BatchedUpdatesNotAvailableOnContextConnection()
1611-
{
1612-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_BatchedUpdatesNotAvailableOnContextConnection));
1613-
}
16141534
internal static Exception Azure_ManagedIdentityException(string msg)
16151535
{
16161536
SqlErrorCollection errors = new SqlErrorCollection
@@ -2411,48 +2331,17 @@ internal static Exception EmptyProviderName()
24112331
// Merged Provider
24122332
//
24132333

2414-
static internal Exception ContextAllowsLimitedKeywords()
2415-
{
2416-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_ContextAllowsLimitedKeywords));
2417-
}
2418-
static internal Exception ContextAllowsOnlyTypeSystem2005()
2419-
{
2420-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_ContextAllowsOnlyTypeSystem2005));
2421-
}
2422-
static internal Exception ContextConnectionIsInUse()
2423-
{
2424-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_ContextConnectionIsInUse));
2425-
}
24262334
static internal Exception ContextConnectionIsUnsupported()
24272335
{
24282336
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_ContextConnectionIsUnsupported));
24292337
}
2430-
static internal Exception ContextUnavailableOutOfProc()
2431-
{
2432-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_ContextUnavailableOutOfProc));
2433-
}
2434-
static internal Exception ContextUnavailableWhileInProc()
2435-
{
2436-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_ContextUnavailableWhileInProc));
2437-
}
2338+
24382339
static internal Exception NestedTransactionScopesNotSupported()
24392340
{
24402341
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_NestedTransactionScopesNotSupported));
24412342
}
2442-
static internal Exception NotAvailableOnContextConnection()
2443-
{
2444-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_NotAvailableOnContextConnection));
2445-
}
2446-
static internal Exception NotificationsNotAvailableOnContextConnection()
2447-
{
2448-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_NotificationsNotAvailableOnContextConnection));
2449-
}
24502343

24512344
// @TODO: Check these methods for usage
2452-
static internal Exception UserInstanceNotAvailableInProc()
2453-
{
2454-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_UserInstanceNotAvailableInProc));
2455-
}
24562345
static internal Exception ArgumentLengthMismatch(string arg1, string arg2)
24572346
{
24582347
return ADP.Argument(StringsHelper.GetString(Strings.SQL_ArgumentLengthMismatch, arg1, arg2));
@@ -2461,10 +2350,6 @@ static internal Exception InvalidSqlDbTypeOneAllowedType(SqlDbType invalidType,
24612350
{
24622351
return ADP.Argument(StringsHelper.GetString(Strings.SQL_InvalidSqlDbTypeWithOneAllowedType, invalidType, method, allowedType));
24632352
}
2464-
static internal Exception SqlPipeErrorRequiresSendEnd()
2465-
{
2466-
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_PipeErrorRequiresSendEnd));
2467-
}
24682353
static internal Exception TooManyValues(string arg)
24692354
{
24702355
return ADP.Argument(StringsHelper.GetString(Strings.SQL_TooManyValues), arg);

0 commit comments

Comments
 (0)