776 references to SR
System.Data.Common (776)
src\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (54)
187
return ArgumentOutOfRange(
SR
.Format(
SR
.ADP_NotSupportedEnumerationValue, type.Name, value, method), type.Name);
202
ArgumentException e = new ArgumentException(
SR
.Format(
SR
.ADP_InvalidMultipartName, property, value));
209
ArgumentException e = new ArgumentException(
SR
.Format(
SR
.ADP_InvalidMultipartNameQuoteUsage, property, value));
216
ArgumentException e = new ArgumentException(
SR
.Format(
SR
.ADP_InvalidMultipartNameToManyParts, property, value, limit));
273
return ArgumentOutOfRange(
SR
.Format(
SR
.ADP_InvalidEnumerationValue, type.Name, value.ToString(CultureInfo.InvariantCulture)), type.Name);
281
return Argument(
SR
.Format(
SR
.ADP_ConnectionStringSyntax, index));
285
return Argument(
SR
.Format(
SR
.ADP_KeywordNotSupported, keyword));
289
return ADP.Argument(
SR
.Format(
SR
.SqlConvert_ConvertFailed, fromType.FullName, toType.FullName), innerException);
301
return Argument(
SR
.Format(
SR
.ADP_InvalidConnectionOptionValue, key), inner);
309
return Argument(
SR
.Format(
SR
.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name));
313
return ArgumentNull(parameter,
SR
.Format(
SR
.ADP_CollectionNullValue, collection.Name, itemType.Name));
317
return IndexOutOfRange(
SR
.Format(
SR
.ADP_CollectionIndexInt32, index.ToString(CultureInfo.InvariantCulture), collection.Name, count.ToString(CultureInfo.InvariantCulture)));
321
return IndexOutOfRange(
SR
.Format(
SR
.ADP_CollectionIndexString, itemType.Name, propertyName, propertyValue, collection.Name));
325
return InvalidCast(
SR
.Format(
SR
.ADP_CollectionInvalidType, collection.Name, itemType.Name, invalidValue.GetType().Name));
337
return
SR
.ADP_ConnectionStateMsg_Closed;
339
return
SR
.ADP_ConnectionStateMsg_Connecting;
341
return
SR
.ADP_ConnectionStateMsg_Open;
343
return
SR
.ADP_ConnectionStateMsg_OpenExecuting;
345
return
SR
.ADP_ConnectionStateMsg_OpenFetching;
347
return
SR
.Format(
SR
.ADP_ConnectionStateMsg, state.ToString());
356
return InvalidOperation(
SR
.Format(
SR
.ADP_StreamClosed, method));
395
return Argument(
SR
.Format(
SR
.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
399
return Argument(
SR
.Format(
SR
.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
445
return InvalidOperation(
SR
.Format(
SR
.ADP_InternalProviderError, (int)internalError));
453
return InvalidOperation(
SR
.Format(
SR
.ADP_DataReaderClosed, method));
457
return ArgumentOutOfRange(
SR
.Format(
SR
.ADP_InvalidSourceBufferIndex, maxLen.ToString(CultureInfo.InvariantCulture), srcOffset.ToString(CultureInfo.InvariantCulture)), parameterName);
461
return ArgumentOutOfRange(
SR
.Format(
SR
.ADP_InvalidDestinationBufferIndex, maxLen.ToString(CultureInfo.InvariantCulture), dstOffset.ToString(CultureInfo.InvariantCulture)), parameterName);
465
return IndexOutOfRange(
SR
.Format(
SR
.SQL_InvalidBufferSizeOrIndex, numBytes.ToString(CultureInfo.InvariantCulture), bufferIndex.ToString(CultureInfo.InvariantCulture)));
469
return IndexOutOfRange(
SR
.Format(
SR
.SQL_InvalidDataLength, length.ToString(CultureInfo.InvariantCulture)));
491
return ArgumentOutOfRange(
SR
.ADP_InvalidSeekOrigin, parameterName);
src\runtime\src\libraries\Common\src\System\Data\Common\SQLResource.cs (26)
16
internal static string NullString =>
SR
.SqlMisc_NullString;
18
internal static string MessageString =>
SR
.SqlMisc_MessageString;
20
internal static string ArithOverflowMessage =>
SR
.SqlMisc_ArithOverflowMessage;
22
internal static string DivideByZeroMessage =>
SR
.SqlMisc_DivideByZeroMessage;
24
internal static string NullValueMessage =>
SR
.SqlMisc_NullValueMessage;
26
internal static string TruncationMessage =>
SR
.SqlMisc_TruncationMessage;
28
internal static string DateTimeOverflowMessage =>
SR
.SqlMisc_DateTimeOverflowMessage;
30
internal static string ConcatDiffCollationMessage =>
SR
.SqlMisc_ConcatDiffCollationMessage;
32
internal static string CompareDiffCollationMessage =>
SR
.SqlMisc_CompareDiffCollationMessage;
34
internal static string InvalidFlagMessage =>
SR
.SqlMisc_InvalidFlagMessage;
36
internal static string NumeToDecOverflowMessage =>
SR
.SqlMisc_NumeToDecOverflowMessage;
38
internal static string ConversionOverflowMessage =>
SR
.SqlMisc_ConversionOverflowMessage;
40
internal static string InvalidDateTimeMessage =>
SR
.SqlMisc_InvalidDateTimeMessage;
42
internal static string TimeZoneSpecifiedMessage =>
SR
.SqlMisc_TimeZoneSpecifiedMessage;
44
internal static string InvalidArraySizeMessage =>
SR
.SqlMisc_InvalidArraySizeMessage;
46
internal static string InvalidPrecScaleMessage =>
SR
.SqlMisc_InvalidPrecScaleMessage;
48
internal static string FormatMessage =>
SR
.SqlMisc_FormatMessage;
50
internal static string NotFilledMessage =>
SR
.SqlMisc_NotFilledMessage;
52
internal static string AlreadyFilledMessage =>
SR
.SqlMisc_AlreadyFilledMessage;
54
internal static string ClosedXmlReaderMessage =>
SR
.SqlMisc_ClosedXmlReaderMessage;
58
return
SR
.Format(
SR
.SqlMisc_InvalidOpStreamNonWritable, method);
63
return
SR
.Format(
SR
.SqlMisc_InvalidOpStreamNonReadable, method);
68
return
SR
.Format(
SR
.SqlMisc_InvalidOpStreamNonSeekable, method);
System\Data\Common\AdapterUtil.Common.cs (81)
52
throw Argument(
SR
.Format(
SR
.ADP_EmptyString, parameterName));
60
throw Argument(
SR
.Format(
SR
.ADP_EmptyArray, parameterName));
268
return Argument(
SR
.ADP_InvalidKey, parameterName);
272
return Argument(
SR
.ADP_InvalidValue, parameterName);
280
return Argument(
SR
.Format(
SR
.SQL_WrongType, got, expected));
288
return Argument(
SR
.Format(
SR
.ADP_CollectionUniqueValue, itemType.Name, propertyName, propertyValue));
294
return Provider(
SR
.Format(
SR
.ADP_MissingSelectCommand, method));
308
return DataMapping(
SR
.Format(
SR
.ADP_ColumnSchemaExpression, srcColumn, cacheColumn));
314
return DataMapping(
SR
.Format(
SR
.ADP_ColumnSchemaMismatch, srcColumn, srcType.Name, column.ColumnName, column.DataType.Name));
322
return InvalidOperation(
SR
.Format(
SR
.ADP_ColumnSchemaMissing1, cacheColumn, tableName, srcColumn));
324
return DataMapping(
SR
.Format(
SR
.ADP_ColumnSchemaMissing2, cacheColumn, tableName, srcColumn));
330
return DataMapping(
SR
.Format(
SR
.ADP_MissingColumnMapping, srcColumn));
336
return DataMapping(
SR
.Format(
SR
.ADP_MissingTableSchema, cacheTable, srcTable));
342
return DataMapping(
SR
.Format(
SR
.ADP_MissingTableMapping, srcTable));
348
return DataMapping(
SR
.Format(
SR
.ADP_MissingTableMappingDestination, dstTable));
356
return Argument(
SR
.ADP_InvalidSourceColumn, parameter);
396
return Argument(
SR
.ADP_InvalidSourceTable, parameter);
440
resource =
SR
.ADP_ConnectionRequired_Clone;
447
resource =
SR
.ADP_ConnectionRequired_Insert;
450
resource =
SR
.ADP_ConnectionRequired_Update;
453
resource =
SR
.ADP_ConnectionRequired_Delete;
456
resource =
SR
.ADP_ConnectionRequired_Batch;
478
resource =
SR
.ADP_OpenConnectionRequired_Clone;
485
resource =
SR
.ADP_OpenConnectionRequired_Insert;
488
resource =
SR
.ADP_OpenConnectionRequired_Update;
491
resource =
SR
.ADP_OpenConnectionRequired_Delete;
505
return InvalidOperation(
SR
.Format(resource, ADP.ConnectionStateMsg(state)));
513
return Argument(
SR
.Format(
SR
.ADP_UnwantedStatementType, statementType.ToString()));
521
return Argument(
SR
.ADP_FillSchemaRequiresSourceTableName, parameter);
529
return Argument(
SR
.Format(
SR
.ADP_InvalidMaxRecords, max.ToString(CultureInfo.InvariantCulture)), parameter);
533
return Argument(
SR
.Format(
SR
.ADP_InvalidStartRecord, start.ToString(CultureInfo.InvariantCulture)), parameter);
541
return Argument(
SR
.ADP_FillRequiresSourceTableName, parameter);
545
return InvalidOperation(
SR
.ADP_FillChapterAutoIncrement);
549
return DataAdapter(
SR
.Format(
SR
.ADP_MissingDataReaderFieldType, index));
553
return DataAdapter(
SR
.ADP_OnlyOneTableForStartRecordOrMaxRecords);
564
return InvalidOperation(
SR
.Format(
SR
.ADP_UpdateRequiresSourceTable, defaultSrcTableName));
568
return InvalidOperation(
SR
.Format(
SR
.ADP_UpdateRequiresSourceTableName, srcTable));
581
resource =
SR
.ADP_UpdateConcurrencyViolation_Update;
584
resource =
SR
.ADP_UpdateConcurrencyViolation_Delete;
587
resource =
SR
.ADP_UpdateConcurrencyViolation_Batch;
598
DBConcurrencyException exception = new DBConcurrencyException(
SR
.Format(resource, affected.ToString(CultureInfo.InvariantCulture), expected.ToString(CultureInfo.InvariantCulture)), null, dataRows);
608
resource =
SR
.ADP_UpdateRequiresCommandClone;
615
resource =
SR
.ADP_UpdateRequiresCommandSelect;
618
resource =
SR
.ADP_UpdateRequiresCommandInsert;
621
resource =
SR
.ADP_UpdateRequiresCommandUpdate;
624
resource =
SR
.ADP_UpdateRequiresCommandDelete;
639
return Argument(
SR
.Format(
SR
.ADP_UpdateMismatchRowTable, i.ToString(CultureInfo.InvariantCulture)));
643
return Data(
SR
.ADP_RowUpdatedErrors);
647
return Data(
SR
.ADP_RowUpdatingErrors);
651
return DataAdapter(
SR
.ADP_ResultsNotAllowedDuringBatch);
659
return InvalidOperation(
SR
.ADP_DynamicSQLJoinUnsupported);
663
return InvalidOperation(
SR
.ADP_DynamicSQLNoTableInfo);
667
return InvalidOperation(
SR
.ADP_DynamicSQLNoKeyInfoDelete);
671
return InvalidOperation(
SR
.ADP_DynamicSQLNoKeyInfoUpdate);
675
return InvalidOperation(
SR
.ADP_DynamicSQLNoKeyInfoRowVersionDelete);
679
return InvalidOperation(
SR
.ADP_DynamicSQLNoKeyInfoRowVersionUpdate);
683
return InvalidOperation(
SR
.Format(
SR
.ADP_DynamicSQLNestedQuote, name, quote));
687
return InvalidOperation(
SR
.ADP_NoQuoteChange);
691
return InvalidOperation(
SR
.ADP_MissingSourceCommand);
695
return InvalidOperation(
SR
.ADP_MissingSourceCommandConnection);
System\Data\Common\DbProviderFactories.cs (11)
63
throw ADP.Argument(
SR
.ADP_DbProviderFactories_NoAssemblyQualifiedName);
69
throw ADP.Argument(
SR
.ADP_DbProviderFactories_NoAssemblyQualifiedName);
154
return throwOnError ? throw ADP.Argument(
SR
.Format(
SR
.ADP_DbProviderFactories_InvariantNameNotFound, providerInvariantName)) : (DbProviderFactory?)null;
173
throw ADP.Argument(
SR
.Format(
SR
.ADP_DbProviderFactories_NotAFactoryType, providerFactoryClass.FullName));
179
throw ADP.InvalidOperation(
SR
.ADP_DbProviderFactories_NoInstance);
183
throw ADP.InvalidOperation(
SR
.ADP_DbProviderFactories_NoInstance);
188
throw ADP.InvalidOperation(
SR
.ADP_DbProviderFactories_NoInstance);
199
throw ADP.Argument(
SR
.Format(
SR
.ADP_DbProviderFactories_FactoryNotLoadable, assemblyQualifiedName));
System\Data\Common\ObjectStorage.cs (1)
567
throw ADP.InvalidOperation(
SR
.Xml_DynamicWithoutXmlSerializable);
System\Data\DataException.cs (425)
21
public DataException() : base(
SR
.DataSet_DefaultDataException)
26
public DataException(string? s) : base(s ??
SR
.DataSet_DefaultDataException)
31
public DataException(string? s, Exception? innerException) : base(s ??
SR
.DataSet_DefaultDataException, innerException) { }
44
public ConstraintException() : base(
SR
.DataSet_DefaultConstraintException)
49
public ConstraintException(string? s) : base(s ??
SR
.DataSet_DefaultConstraintException)
54
public ConstraintException(string? message, Exception? innerException) : base(message ??
SR
.DataSet_DefaultConstraintException, innerException)
73
public DeletedRowInaccessibleException() : base(
SR
.DataSet_DefaultDeletedRowInaccessibleException)
81
public DeletedRowInaccessibleException(string? s) : base(s ??
SR
.DataSet_DefaultDeletedRowInaccessibleException)
86
public DeletedRowInaccessibleException(string? message, Exception? innerException) : base(message ??
SR
.DataSet_DefaultDeletedRowInaccessibleException, innerException)
102
public DuplicateNameException() : base(
SR
.DataSet_DefaultDuplicateNameException)
107
public DuplicateNameException(string? s) : base(s ??
SR
.DataSet_DefaultDuplicateNameException)
112
public DuplicateNameException(string? message, Exception? innerException) : base(message ??
SR
.DataSet_DefaultDuplicateNameException, innerException)
128
public InRowChangingEventException() : base(
SR
.DataSet_DefaultInRowChangingEventException)
133
public InRowChangingEventException(string? s) : base(s ??
SR
.DataSet_DefaultInRowChangingEventException)
138
public InRowChangingEventException(string? message, Exception? innerException) : base(message ??
SR
.DataSet_DefaultInRowChangingEventException, innerException)
154
public InvalidConstraintException() : base(
SR
.DataSet_DefaultInvalidConstraintException)
159
public InvalidConstraintException(string? s) : base(s ??
SR
.DataSet_DefaultInvalidConstraintException)
164
public InvalidConstraintException(string? message, Exception? innerException) : base(message ??
SR
.DataSet_DefaultInvalidConstraintException, innerException)
180
public MissingPrimaryKeyException() : base(
SR
.DataSet_DefaultMissingPrimaryKeyException)
185
public MissingPrimaryKeyException(string? s) : base(s ??
SR
.DataSet_DefaultMissingPrimaryKeyException)
190
public MissingPrimaryKeyException(string? message, Exception? innerException) : base(message ??
SR
.DataSet_DefaultMissingPrimaryKeyException, innerException)
206
public NoNullAllowedException() : base(
SR
.DataSet_DefaultNoNullAllowedException)
211
public NoNullAllowedException(string? s) : base(s ??
SR
.DataSet_DefaultNoNullAllowedException)
216
public NoNullAllowedException(string? message, Exception? innerException) : base(message ??
SR
.DataSet_DefaultNoNullAllowedException, innerException)
232
public ReadOnlyException() : base(
SR
.DataSet_DefaultReadOnlyException)
237
public ReadOnlyException(string? s) : base(s ??
SR
.DataSet_DefaultReadOnlyException)
242
public ReadOnlyException(string? message, Exception? innerException) : base(message ??
SR
.DataSet_DefaultReadOnlyException, innerException)
258
public RowNotInTableException() : base(
SR
.DataSet_DefaultRowNotInTableException)
263
public RowNotInTableException(string? s) : base(s ??
SR
.DataSet_DefaultRowNotInTableException)
268
public RowNotInTableException(string? message, Exception? innerException) : base(message ??
SR
.DataSet_DefaultRowNotInTableException, innerException)
284
public VersionNotFoundException() : base(
SR
.DataSet_DefaultVersionNotFoundException)
289
public VersionNotFoundException(string? s) : base(s ?? (
SR
.DataSet_DefaultVersionNotFoundException))
294
public VersionNotFoundException(string? message, Exception? innerException) : base(message ?? (
SR
.DataSet_DefaultVersionNotFoundException), innerException)
346
=> _InvalidEnumArgumentException(
SR
.Format(
SR
.ADP_InvalidEnumerationValue, typeof(T).Name, value.ToString()));
370
public static Exception ArgumentNull(string paramName) => _ArgumentNull(paramName,
SR
.Format(
SR
.Data_ArgumentNull, paramName));
371
public static Exception ArgumentOutOfRange(string paramName) => _ArgumentOutOfRange(paramName,
SR
.Format(
SR
.Data_ArgumentOutOfRange, paramName));
372
public static Exception BadObjectPropertyAccess(string error) => _InvalidOperation(
SR
.Format(
SR
.DataConstraint_BadObjectPropertyAccess, error));
373
public static Exception ArgumentContainsNull(string paramName) => TraceExceptionAsReturnValue(new ArgumentException(
SR
.Data_ArgumentContainsNull, paramName));
374
public static Exception TypeNotAllowed(Type type) => _InvalidOperation(
SR
.Format(
SR
.Data_TypeNotAllowed, type.AssemblyQualifiedName));
380
public static Exception NotSupportedOnDataSourceBatch() => Common.ADP.NotSupported(
SR
.Batch_NotSupportedOnDataSourceBatch);
386
public static Exception NotSupportedOnDataSourceCommand() => Common.ADP.NotSupported(
SR
.Command_NotSupportedOnDataSourceCommand);
392
public static Exception CannotModifyCollection() => _Argument(
SR
.Data_CannotModifyCollection);
393
public static Exception CaseInsensitiveNameConflict(string? name) => _Argument(
SR
.Format(
SR
.Data_CaseInsensitiveNameConflict, name));
394
public static Exception NamespaceNameConflict(string? name) => _Argument(
SR
.Format(
SR
.Data_NamespaceNameConflict, name));
395
public static Exception InvalidOffsetLength() => _Argument(
SR
.Data_InvalidOffsetLength);
401
public static Exception ColumnNotInTheTable(string column, string table) => _Argument(
SR
.Format(
SR
.DataColumn_NotInTheTable, column, table));
402
public static Exception ColumnNotInAnyTable() => _Argument(
SR
.DataColumn_NotInAnyTable);
403
public static Exception ColumnOutOfRange(int index) => _IndexOutOfRange(
SR
.Format(
SR
.DataColumns_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
404
public static Exception ColumnOutOfRange(string column) => _IndexOutOfRange(
SR
.Format(
SR
.DataColumns_OutOfRange, column));
405
public static Exception CannotAddColumn1(string column) => _Argument(
SR
.Format(
SR
.DataColumns_Add1, column));
406
public static Exception CannotAddColumn2(string column) => _Argument(
SR
.Format(
SR
.DataColumns_Add2, column));
407
public static Exception CannotAddColumn3() => _Argument(
SR
.DataColumns_Add3);
408
public static Exception CannotAddColumn4(string column) => _Argument(
SR
.Format(
SR
.DataColumns_Add4, column));
409
public static Exception CannotAddDuplicate(string column) => _DuplicateName(
SR
.Format(
SR
.DataColumns_AddDuplicate, column));
410
public static Exception CannotAddDuplicate2(string table) => _DuplicateName(
SR
.Format(
SR
.DataColumns_AddDuplicate2, table));
411
public static Exception CannotAddDuplicate3(string table) => _DuplicateName(
SR
.Format(
SR
.DataColumns_AddDuplicate3, table));
412
public static Exception CannotRemoveColumn() => _Argument(
SR
.DataColumns_Remove);
413
public static Exception CannotRemovePrimaryKey() => _Argument(
SR
.DataColumns_RemovePrimaryKey);
414
public static Exception CannotRemoveChildKey(string relation) => _Argument(
SR
.Format(
SR
.DataColumns_RemoveChildKey, relation));
415
public static Exception CannotRemoveConstraint(string constraint, string table) => _Argument(
SR
.Format(
SR
.DataColumns_RemoveConstraint, constraint, table));
416
public static Exception CannotRemoveExpression(string column, string expression) => _Argument(
SR
.Format(
SR
.DataColumns_RemoveExpression, column, expression));
417
public static Exception ColumnNotInTheUnderlyingTable(string column, string table) => _Argument(
SR
.Format(
SR
.DataColumn_NotInTheUnderlyingTable, column, table));
418
public static Exception InvalidOrdinal(string name, int ordinal) => _ArgumentOutOfRange(name,
SR
.Format(
SR
.DataColumn_OrdinalExceedMaximum, (ordinal).ToString(CultureInfo.InvariantCulture)));
424
public static Exception AddPrimaryKeyConstraint() => _Argument(
SR
.DataConstraint_AddPrimaryKeyConstraint);
425
public static Exception NoConstraintName() => _Argument(
SR
.DataConstraint_NoName);
426
public static Exception ConstraintViolation(string constraint) => _Constraint(
SR
.Format(
SR
.DataConstraint_Violation, constraint));
427
public static Exception ConstraintNotInTheTable(string constraint) => _Argument(
SR
.Format(
SR
.DataConstraint_NotInTheTable, constraint));
448
return
SR
.Format(
SR
.DataConstraint_ViolationValue, columnNames, KeysToString(values));
452
return
SR
.Format(
SR
.DataConstraint_ViolationValue, columns[0].ColumnName, Convert.ToString(values[0], null));
457
public static Exception ConstraintOutOfRange(int index) => _IndexOutOfRange(
SR
.Format(
SR
.DataConstraint_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
458
public static Exception DuplicateConstraint(string constraint) => _Data(
SR
.Format(
SR
.DataConstraint_Duplicate, constraint));
459
public static Exception DuplicateConstraintName(string constraint) => _DuplicateName(
SR
.Format(
SR
.DataConstraint_DuplicateName, constraint));
460
public static Exception NeededForForeignKeyConstraint(UniqueConstraint key, ForeignKeyConstraint fk) => _Argument(
SR
.Format(
SR
.DataConstraint_NeededForForeignKeyConstraint, key.ConstraintName, fk.ConstraintName));
461
public static Exception UniqueConstraintViolation() => _Argument(
SR
.DataConstraint_UniqueViolation);
462
public static Exception ConstraintForeignTable() => _Argument(
SR
.DataConstraint_ForeignTable);
463
public static Exception ConstraintParentValues() => _Argument(
SR
.DataConstraint_ParentValues);
464
public static Exception ConstraintAddFailed(DataTable table) => _InvalidConstraint(
SR
.Format(
SR
.DataConstraint_AddFailed, table.TableName));
465
public static Exception ConstraintRemoveFailed() => _Argument(
SR
.DataConstraint_RemoveFailed);
466
public static Exception FailedCascadeDelete(string constraint) => _InvalidConstraint(
SR
.Format(
SR
.DataConstraint_CascadeDelete, constraint));
467
public static Exception FailedCascadeUpdate(string constraint) => _InvalidConstraint(
SR
.Format(
SR
.DataConstraint_CascadeUpdate, constraint));
468
public static Exception FailedClearParentTable(string table, string constraint, string childTable) => _InvalidConstraint(
SR
.Format(
SR
.DataConstraint_ClearParentTable, table, constraint, childTable));
469
public static Exception ForeignKeyViolation(string constraint, object[] keys) => _InvalidConstraint(
SR
.Format(
SR
.DataConstraint_ForeignKeyViolation, constraint, KeysToString(keys)));
470
public static Exception RemoveParentRow(ForeignKeyConstraint constraint) => _InvalidConstraint(
SR
.Format(
SR
.DataConstraint_RemoveParentRow, constraint.ConstraintName));
471
public static string MaxLengthViolationText(string columnName) =>
SR
.Format(
SR
.DataColumn_ExceedMaxLength, columnName);
472
public static string NotAllowDBNullViolationText(string columnName) =>
SR
.Format(
SR
.DataColumn_NotAllowDBNull, columnName);
473
public static Exception CantAddConstraintToMultipleNestedTable(string tableName) => _Argument(
SR
.Format(
SR
.DataConstraint_CantAddConstraintToMultipleNestedTable, tableName));
479
public static Exception AutoIncrementAndExpression() => _Argument(
SR
.DataColumn_AutoIncrementAndExpression);
480
public static Exception AutoIncrementAndDefaultValue() => _Argument(
SR
.DataColumn_AutoIncrementAndDefaultValue);
481
public static Exception AutoIncrementSeed() => _Argument(
SR
.DataColumn_AutoIncrementSeed);
482
public static Exception CantChangeDataType() => _Argument(
SR
.DataColumn_ChangeDataType);
483
public static Exception NullDataType() => _Argument(
SR
.DataColumn_NullDataType);
484
public static Exception ColumnNameRequired() => _Argument(
SR
.DataColumn_NameRequired);
485
public static Exception DefaultValueAndAutoIncrement() => _Argument(
SR
.DataColumn_DefaultValueAndAutoIncrement);
488
_Argument(
SR
.Format(
SR
.DataColumn_DefaultValueDataType1, defaultType.FullName, columnType.FullName), inner) :
489
_Argument(
SR
.Format(
SR
.DataColumn_DefaultValueDataType, column, defaultType.FullName, columnType.FullName), inner);
491
public static Exception DefaultValueColumnDataType(string column, Type defaultType, Type columnType, Exception inner) => _Argument(
SR
.Format(
SR
.DataColumn_DefaultValueColumnDataType, column, defaultType.FullName, columnType.FullName), inner);
492
public static Exception ExpressionAndUnique() => _Argument(
SR
.DataColumn_ExpressionAndUnique);
493
public static Exception ExpressionAndReadOnly() => _Argument(
SR
.DataColumn_ExpressionAndReadOnly);
494
public static Exception ExpressionAndConstraint(DataColumn column, Constraint constraint) => _Argument(
SR
.Format(
SR
.DataColumn_ExpressionAndConstraint, column.ColumnName, constraint.ConstraintName));
495
public static Exception ExpressionInConstraint(DataColumn column) => _Argument(
SR
.Format(
SR
.DataColumn_ExpressionInConstraint, column.ColumnName));
496
public static Exception ExpressionCircular() => _Argument(
SR
.DataColumn_ExpressionCircular);
497
public static Exception NonUniqueValues(string column) => _InvalidConstraint(
SR
.Format(
SR
.DataColumn_NonUniqueValues, column));
498
public static Exception NullKeyValues(string column) => _Data(
SR
.Format(
SR
.DataColumn_NullKeyValues, column));
499
public static Exception NullValues(string column) => _NoNullAllowed(
SR
.Format(
SR
.DataColumn_NullValues, column));
500
public static Exception ReadOnlyAndExpression() => _ReadOnly(
SR
.DataColumn_ReadOnlyAndExpression);
501
public static Exception ReadOnly(string column) => _ReadOnly(
SR
.Format(
SR
.DataColumn_ReadOnly, column));
502
public static Exception UniqueAndExpression() => _Argument(
SR
.DataColumn_UniqueAndExpression);
503
public static Exception SetFailed(object? value, DataColumn column, Type type, Exception innerException) => _Argument(innerException.Message +
SR
.Format(
SR
.DataColumn_SetFailed, value?.ToString(), column.ColumnName, type.Name), innerException);
504
public static Exception CannotSetToNull(DataColumn column) => _Argument(
SR
.Format(
SR
.DataColumn_CannotSetToNull, column.ColumnName));
505
public static Exception LongerThanMaxLength(DataColumn column) => _Argument(
SR
.Format(
SR
.DataColumn_LongerThanMaxLength, column.ColumnName));
506
public static Exception CannotSetMaxLength(DataColumn column, int value) => _Argument(
SR
.Format(
SR
.DataColumn_CannotSetMaxLength, column.ColumnName, value.ToString(CultureInfo.InvariantCulture)));
507
public static Exception CannotSetMaxLength2(DataColumn column) => _Argument(
SR
.Format(
SR
.DataColumn_CannotSetMaxLength2, column.ColumnName));
508
public static Exception CannotSetSimpleContentType(string columnName, Type type) => _Argument(
SR
.Format(
SR
.DataColumn_CannotSimpleContentType, columnName, type));
509
public static Exception CannotSetSimpleContent(string columnName, Type type) => _Argument(
SR
.Format(
SR
.DataColumn_CannotSimpleContent, columnName, type));
510
public static Exception CannotChangeNamespace(string columnName) => _Argument(
SR
.Format(
SR
.DataColumn_CannotChangeNamespace, columnName));
511
public static Exception HasToBeStringType(DataColumn column) => _Argument(
SR
.Format(
SR
.DataColumn_HasToBeStringType, column.ColumnName));
512
public static Exception AutoIncrementCannotSetIfHasData(string typeName) => _Argument(
SR
.Format(
SR
.DataColumn_AutoIncrementCannotSetIfHasData, typeName));
513
public static Exception INullableUDTwithoutStaticNull(string typeName) => _Argument(
SR
.Format(
SR
.DataColumn_INullableUDTwithoutStaticNull, typeName));
514
public static Exception IComparableNotImplemented(string typeName) => _Data(
SR
.Format(
SR
.DataStorage_IComparableNotDefined, typeName));
515
public static Exception UDTImplementsIChangeTrackingButnotIRevertible(string typeName) => _InvalidOperation(
SR
.Format(
SR
.DataColumn_UDTImplementsIChangeTrackingButnotIRevertible, typeName));
516
public static Exception SetAddedAndModifiedCalledOnnonUnchanged() => _InvalidOperation(
SR
.DataColumn_SetAddedAndModifiedCalledOnNonUnchanged);
517
public static Exception InvalidDataColumnMapping(Type type) => _Argument(
SR
.Format(
SR
.DataColumn_InvalidDataColumnMapping, type.AssemblyQualifiedName));
518
public static Exception CannotSetDateTimeModeForNonDateTimeColumns() => _InvalidOperation(
SR
.DataColumn_CannotSetDateTimeModeForNonDateTimeColumns);
520
public static Exception CantChangeDateTimeMode(DataSetDateTime oldValue, DataSetDateTime newValue) => _InvalidOperation(
SR
.Format(
SR
.DataColumn_DateTimeMode, oldValue.ToString(), newValue.ToString()));
521
public static Exception ColumnTypeNotSupported() => Common.ADP.NotSupported(
SR
.DataColumn_NullableTypesNotSupported);
527
public static Exception SetFailed(string name) => _Data(
SR
.Format(
SR
.DataView_SetFailed, name));
528
public static Exception SetDataSetFailed() => _Data(
SR
.DataView_SetDataSetFailed);
529
public static Exception SetRowStateFilter() => _Data(
SR
.DataView_SetRowStateFilter);
530
public static Exception CanNotSetDataSet() => _Data(
SR
.DataView_CanNotSetDataSet);
531
public static Exception CanNotUseDataViewManager() => _Data(
SR
.DataView_CanNotUseDataViewManager);
532
public static Exception CanNotSetTable() => _Data(
SR
.DataView_CanNotSetTable);
533
public static Exception CanNotUse() => _Data(
SR
.DataView_CanNotUse);
534
public static Exception CanNotBindTable() => _Data(
SR
.DataView_CanNotBindTable);
535
public static Exception SetTable() => _Data(
SR
.DataView_SetTable);
536
public static Exception SetIListObject() => _Argument(
SR
.DataView_SetIListObject);
537
public static Exception AddNewNotAllowNull() => _Data(
SR
.DataView_AddNewNotAllowNull);
538
public static Exception NotOpen() => _Data(
SR
.DataView_NotOpen);
539
public static Exception CreateChildView() => _Argument(
SR
.DataView_CreateChildView);
540
public static Exception CanNotDelete() => _Data(
SR
.DataView_CanNotDelete);
541
public static Exception CanNotEdit() => _Data(
SR
.DataView_CanNotEdit);
542
public static Exception GetElementIndex(int index) => _IndexOutOfRange(
SR
.Format(
SR
.DataView_GetElementIndex, (index).ToString(CultureInfo.InvariantCulture)));
543
public static Exception AddExternalObject() => _Argument(
SR
.DataView_AddExternalObject);
544
public static Exception CanNotClear() => _Argument(
SR
.DataView_CanNotClear);
545
public static Exception InsertExternalObject() => _Argument(
SR
.DataView_InsertExternalObject);
546
public static Exception RemoveExternalObject() => _Argument(
SR
.DataView_RemoveExternalObject);
547
public static Exception PropertyNotFound(string property, string table) => _Argument(
SR
.Format(
SR
.DataROWView_PropertyNotFound, property, table));
548
public static Exception ColumnToSortIsOutOfRange(string column) => _Argument(
SR
.Format(
SR
.DataColumns_OutOfRange, column));
554
public static Exception KeyTableMismatch() => _InvalidConstraint(
SR
.DataKey_TableMismatch);
555
public static Exception KeyNoColumns() => _InvalidConstraint(
SR
.DataKey_NoColumns);
556
public static Exception KeyTooManyColumns(int cols) => _InvalidConstraint(
SR
.Format(
SR
.DataKey_TooManyColumns, (cols).ToString(CultureInfo.InvariantCulture)));
557
public static Exception KeyDuplicateColumns(string columnName) => _InvalidConstraint(
SR
.Format(
SR
.DataKey_DuplicateColumns, columnName));
563
public static Exception RelationDataSetMismatch() => _InvalidConstraint(
SR
.DataRelation_DataSetMismatch);
564
public static Exception NoRelationName() => _Argument(
SR
.DataRelation_NoName);
565
public static Exception ColumnsTypeMismatch() => _InvalidConstraint(
SR
.DataRelation_ColumnsTypeMismatch);
566
public static Exception KeyLengthMismatch() => _Argument(
SR
.DataRelation_KeyLengthMismatch);
567
public static Exception KeyLengthZero() => _Argument(
SR
.DataRelation_KeyZeroLength);
568
public static Exception ForeignRelation() => _Argument(
SR
.DataRelation_ForeignDataSet);
569
public static Exception KeyColumnsIdentical() => _InvalidConstraint(
SR
.DataRelation_KeyColumnsIdentical);
570
public static Exception RelationForeignTable(string t1, string t2) => _InvalidConstraint(
SR
.Format(
SR
.DataRelation_ForeignTable, t1, t2));
571
public static Exception GetParentRowTableMismatch(string t1, string t2) => _InvalidConstraint(
SR
.Format(
SR
.DataRelation_GetParentRowTableMismatch, t1, t2));
572
public static Exception SetParentRowTableMismatch(string t1, string t2) => _InvalidConstraint(
SR
.Format(
SR
.DataRelation_SetParentRowTableMismatch, t1, t2));
573
public static Exception RelationForeignRow() => _Argument(
SR
.DataRelation_ForeignRow);
574
public static Exception RelationNestedReadOnly() => _Argument(
SR
.DataRelation_RelationNestedReadOnly);
575
public static Exception TableCantBeNestedInTwoTables(string tableName) => _Argument(
SR
.Format(
SR
.DataRelation_TableCantBeNestedInTwoTables, tableName));
576
public static Exception LoopInNestedRelations(string tableName) => _Argument(
SR
.Format(
SR
.DataRelation_LoopInNestedRelations, tableName));
577
public static Exception RelationDoesNotExist() => _Argument(
SR
.DataRelation_DoesNotExist);
578
public static Exception ParentRowNotInTheDataSet() => _Argument(
SR
.DataRow_ParentRowNotInTheDataSet);
579
public static Exception ParentOrChildColumnsDoNotHaveDataSet() => _InvalidConstraint(
SR
.DataRelation_ParentOrChildColumnsDoNotHaveDataSet);
580
public static Exception InValidNestedRelation(string childTableName) => _InvalidOperation(
SR
.Format(
SR
.DataRelation_InValidNestedRelation, childTableName));
581
public static Exception InvalidParentNamespaceinNestedRelation(string childTableName) => _InvalidOperation(
SR
.Format(
SR
.DataRelation_InValidNamespaceInNestedRelation, childTableName));
587
public static Exception RowNotInTheDataSet() => _Argument(
SR
.DataRow_NotInTheDataSet);
588
public static Exception RowNotInTheTable() => _RowNotInTable(
SR
.DataRow_NotInTheTable);
589
public static Exception EditInRowChanging() => _InRowChangingEvent(
SR
.DataRow_EditInRowChanging);
590
public static Exception EndEditInRowChanging() => _InRowChangingEvent(
SR
.DataRow_EndEditInRowChanging);
591
public static Exception BeginEditInRowChanging() => _InRowChangingEvent(
SR
.DataRow_BeginEditInRowChanging);
592
public static Exception CancelEditInRowChanging() => _InRowChangingEvent(
SR
.DataRow_CancelEditInRowChanging);
593
public static Exception DeleteInRowDeleting() => _InRowChangingEvent(
SR
.DataRow_DeleteInRowDeleting);
594
public static Exception ValueArrayLength() => _Argument(
SR
.DataRow_ValuesArrayLength);
595
public static Exception NoCurrentData() => _VersionNotFound(
SR
.DataRow_NoCurrentData);
596
public static Exception NoOriginalData() => _VersionNotFound(
SR
.DataRow_NoOriginalData);
597
public static Exception NoProposedData() => _VersionNotFound(
SR
.DataRow_NoProposedData);
598
public static Exception RowRemovedFromTheTable() => _RowNotInTable(
SR
.DataRow_RemovedFromTheTable);
599
public static Exception DeletedRowInaccessible() => _DeletedRowInaccessible(
SR
.DataRow_DeletedRowInaccessible);
600
public static Exception RowAlreadyDeleted() => _DeletedRowInaccessible(
SR
.DataRow_AlreadyDeleted);
601
public static Exception RowEmpty() => _Argument(
SR
.DataRow_Empty);
602
public static Exception InvalidRowVersion() => _Data(
SR
.DataRow_InvalidVersion);
603
public static Exception RowOutOfRange() => _IndexOutOfRange(
SR
.DataRow_RowOutOfRange);
604
public static Exception RowOutOfRange(int index) => _IndexOutOfRange(
SR
.Format(
SR
.DataRow_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
605
public static Exception RowInsertOutOfRange(int index) => _IndexOutOfRange(
SR
.Format(
SR
.DataRow_RowInsertOutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
606
public static Exception RowInsertTwice(int index, string tableName) => _IndexOutOfRange(
SR
.Format(
SR
.DataRow_RowInsertTwice, (index).ToString(CultureInfo.InvariantCulture), tableName));
607
public static Exception RowInsertMissing(string tableName) => _IndexOutOfRange(
SR
.Format(
SR
.DataRow_RowInsertMissing, tableName));
608
public static Exception RowAlreadyRemoved() => _Data(
SR
.DataRow_AlreadyRemoved);
609
public static Exception MultipleParents() => _Data(
SR
.DataRow_MultipleParents);
611
public static Exception InvalidRowBitPattern() => _Argument(
SR
.DataRow_InvalidRowBitPattern);
617
internal static Exception SetDataSetNameToEmpty() => _Argument(
SR
.DataSet_SetNameToEmpty);
618
internal static Exception SetDataSetNameConflicting(string name) => _Argument(
SR
.Format(
SR
.DataSet_SetDataSetNameConflicting, name));
619
public static Exception DataSetUnsupportedSchema(string ns) => _Argument(
SR
.Format(
SR
.DataSet_UnsupportedSchema, ns));
620
public static Exception MergeMissingDefinition(string obj) => _Argument(
SR
.Format(
SR
.DataMerge_MissingDefinition, obj));
621
public static Exception TablesInDifferentSets() => _Argument(
SR
.DataRelation_TablesInDifferentSets);
622
public static Exception RelationAlreadyExists() => _Argument(
SR
.DataRelation_AlreadyExists);
623
public static Exception RowAlreadyInOtherCollection() => _Argument(
SR
.DataRow_AlreadyInOtherCollection);
624
public static Exception RowAlreadyInTheCollection() => _Argument(
SR
.DataRow_AlreadyInTheCollection);
625
public static Exception TableMissingPrimaryKey() => _MissingPrimaryKey(
SR
.DataTable_MissingPrimaryKey);
626
public static Exception RecordStateRange() => _Argument(
SR
.DataIndex_RecordStateRange);
628
_Argument(
SR
.DataIndex_FindWithoutSortOrder) :
629
_Argument(
SR
.Format(
SR
.DataIndex_KeyLength, (length).ToString(CultureInfo.InvariantCulture), (keyLength).ToString(CultureInfo.InvariantCulture)));
631
_Argument(
SR
.DataKey_RemovePrimaryKey) :
632
_Argument(
SR
.Format(
SR
.DataKey_RemovePrimaryKey1, table.TableName));
633
public static Exception RelationAlreadyInOtherDataSet() => _Argument(
SR
.DataRelation_AlreadyInOtherDataSet);
634
public static Exception RelationAlreadyInTheDataSet() => _Argument(
SR
.DataRelation_AlreadyInTheDataSet);
635
public static Exception RelationNotInTheDataSet(string relation) => _Argument(
SR
.Format(
SR
.DataRelation_NotInTheDataSet, relation));
636
public static Exception RelationOutOfRange(object index) => _IndexOutOfRange(
SR
.Format(
SR
.DataRelation_OutOfRange, Convert.ToString(index, null)));
637
public static Exception DuplicateRelation(string relation) => _DuplicateName(
SR
.Format(
SR
.DataRelation_DuplicateName, relation));
638
public static Exception RelationTableNull() => _Argument(
SR
.DataRelation_TableNull);
639
public static Exception RelationDataSetNull() => _Argument(
SR
.DataRelation_TableNull);
640
public static Exception RelationTableWasRemoved() => _Argument(
SR
.DataRelation_TableWasRemoved);
641
public static Exception ParentTableMismatch() => _Argument(
SR
.DataRelation_ParentTableMismatch);
642
public static Exception ChildTableMismatch() => _Argument(
SR
.DataRelation_ChildTableMismatch);
643
public static Exception EnforceConstraint() => _Constraint(
SR
.Data_EnforceConstraints);
644
public static Exception CaseLocaleMismatch() => _Argument(
SR
.DataRelation_CaseLocaleMismatch);
646
public static Exception CannotChangeCaseLocale(Exception? innerException) => _Argument(
SR
.DataSet_CannotChangeCaseLocale, innerException);
647
public static Exception CannotChangeSchemaSerializationMode() => _InvalidOperation(
SR
.DataSet_CannotChangeSchemaSerializationMode);
648
public static Exception InvalidSchemaSerializationMode(Type enumType, string mode) => _InvalidEnumArgumentException(
SR
.Format(
SR
.ADP_InvalidEnumerationValue, enumType.Name, mode));
655
public static Exception TableForeignPrimaryKey() => _Argument(
SR
.DataTable_ForeignPrimaryKey);
656
public static Exception TableCannotAddToSimpleContent() => _Argument(
SR
.DataTable_CannotAddToSimpleContent);
657
public static Exception NoTableName() => _Argument(
SR
.DataTable_NoName);
658
public static Exception MultipleTextOnlyColumns() => _Argument(
SR
.DataTable_MultipleSimpleContentColumns);
659
public static Exception InvalidSortString(string sort) => _Argument(
SR
.Format(
SR
.DataTable_InvalidSortString, sort));
660
public static Exception DuplicateTableName(string table) => _DuplicateName(
SR
.Format(
SR
.DataTable_DuplicateName, table));
661
public static Exception DuplicateTableName2(string table, string ns) => _DuplicateName(
SR
.Format(
SR
.DataTable_DuplicateName2, table, ns));
662
public static Exception SelfnestedDatasetConflictingName(string table) => _DuplicateName(
SR
.Format(
SR
.DataTable_SelfnestedDatasetConflictingName, table));
663
public static Exception DatasetConflictingName(string table) => _DuplicateName(
SR
.Format(
SR
.DataTable_DatasetConflictingName, table));
664
public static Exception TableAlreadyInOtherDataSet() => _Argument(
SR
.DataTable_AlreadyInOtherDataSet);
665
public static Exception TableAlreadyInTheDataSet() => _Argument(
SR
.DataTable_AlreadyInTheDataSet);
666
public static Exception TableOutOfRange(int index) => _IndexOutOfRange(
SR
.Format(
SR
.DataTable_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
667
public static Exception TableNotInTheDataSet(string table) => _Argument(
SR
.Format(
SR
.DataTable_NotInTheDataSet, table));
668
public static Exception TableInRelation() => _Argument(
SR
.DataTable_InRelation);
669
public static Exception TableInConstraint(DataTable table, Constraint constraint) => _Argument(
SR
.Format(
SR
.DataTable_InConstraint, table.TableName, constraint.ConstraintName));
670
public static Exception CanNotSerializeDataTableHierarchy() => _InvalidOperation(
SR
.DataTable_CanNotSerializeDataTableHierarchy);
671
public static Exception CanNotRemoteDataTable() => _InvalidOperation(
SR
.DataTable_CanNotRemoteDataTable);
672
public static Exception CanNotSetRemotingFormat() => _Argument(
SR
.DataTable_CanNotSetRemotingFormat);
673
public static Exception CanNotSerializeDataTableWithEmptyName() => _InvalidOperation(
SR
.DataTable_CanNotSerializeDataTableWithEmptyName);
674
public static Exception TableNotFound(string tableName) => _Argument(
SR
.Format(
SR
.DataTable_TableNotFound, tableName));
680
public static Exception AggregateException(AggregateType aggregateType, Type type) => _Data(
SR
.Format(
SR
.DataStorage_AggregateException, aggregateType, type.Name));
681
public static Exception InvalidStorageType(TypeCode typecode) => _Data(
SR
.Format(
SR
.DataStorage_InvalidStorageType, typecode.ToString()));
682
public static Exception RangeArgument(int min, int max) => _Argument(
SR
.Format(
SR
.Range_Argument, (min).ToString(CultureInfo.InvariantCulture), (max).ToString(CultureInfo.InvariantCulture)));
683
public static Exception NullRange() => _Data(
SR
.Range_NullRange);
684
public static Exception NegativeMinimumCapacity() => _Argument(
SR
.RecordManager_MinimumCapacity);
685
public static Exception ProblematicChars(char charValue) => _Argument(
SR
.Format(
SR
.DataStorage_ProblematicChars, $"0x{(ushort)charValue:X}"));
686
public static Exception StorageSetFailed() => _Argument(
SR
.DataStorage_SetInvalidDataType);
692
public static Exception SimpleTypeNotSupported() => _Data(
SR
.Xml_SimpleTypeNotSupported);
694
public static Exception MissingAttribute(string element, string attribute) => _Data(
SR
.Format(
SR
.Xml_MissingAttribute, element, attribute));
695
public static Exception InvalidAttributeValue(string name, string value) => _Data(
SR
.Format(
SR
.Xml_ValueOutOfRange, name, value));
696
public static Exception AttributeValues(string name, string value1, string value2) => _Data(
SR
.Format(
SR
.Xml_AttributeValues, name, value1, value2));
697
public static Exception ElementTypeNotFound(string name) => _Data(
SR
.Format(
SR
.Xml_ElementTypeNotFound, name));
698
public static Exception RelationParentNameMissing(string rel) => _Data(
SR
.Format(
SR
.Xml_RelationParentNameMissing, rel));
699
public static Exception RelationChildNameMissing(string rel) => _Data(
SR
.Format(
SR
.Xml_RelationChildNameMissing, rel));
700
public static Exception RelationTableKeyMissing(string rel) => _Data(
SR
.Format(
SR
.Xml_RelationTableKeyMissing, rel));
701
public static Exception RelationChildKeyMissing(string rel) => _Data(
SR
.Format(
SR
.Xml_RelationChildKeyMissing, rel));
702
public static Exception UndefinedDatatype(string name) => _Data(
SR
.Format(
SR
.Xml_UndefinedDatatype, name));
703
public static Exception DatatypeNotDefined() => _Data(
SR
.Xml_DatatypeNotDefined);
704
public static Exception MismatchKeyLength() => _Data(
SR
.Xml_MismatchKeyLength);
705
public static Exception InvalidField(string name) => _Data(
SR
.Format(
SR
.Xml_InvalidField, name));
706
public static Exception InvalidSelector(string name) => _Data(
SR
.Format(
SR
.Xml_InvalidSelector, name));
707
public static Exception CircularComplexType(string name) => _Data(
SR
.Format(
SR
.Xml_CircularComplexType, name));
708
public static Exception CannotInstantiateAbstract(string name) => _Data(
SR
.Format(
SR
.Xml_CannotInstantiateAbstract, name));
709
public static Exception InvalidKey(string name) => _Data(
SR
.Format(
SR
.Xml_InvalidKey, name));
710
public static Exception DiffgramMissingSQL() => _Data(
SR
.Xml_MissingSQL);
711
public static Exception DuplicateConstraintRead(string str) => _Data(
SR
.Format(
SR
.Xml_DuplicateConstraint, str));
712
public static Exception ColumnTypeConflict(string name) => _Data(
SR
.Format(
SR
.Xml_ColumnConflict, name));
713
public static Exception CannotConvert(string name, string? type) => _Data(
SR
.Format(
SR
.Xml_CannotConvert, name, type));
714
public static Exception MissingRefer(string name) => _Data(
SR
.Format(
SR
.Xml_MissingRefer, Keywords.REFER, Keywords.XSD_KEYREF, name));
715
public static Exception InvalidPrefix(string name) => _Data(
SR
.Format(
SR
.Xml_InvalidPrefix_SpecialCharacters, name));
716
public static Exception CanNotDeserializeObjectType() => _InvalidOperation(
SR
.Xml_CanNotDeserializeObjectType);
717
public static Exception IsDataSetAttributeMissingInSchema() => _Data(
SR
.Xml_IsDataSetAttributeMissingInSchema);
718
public static Exception TooManyIsDataSetAttributesInSchema() => _Data(
SR
.Xml_TooManyIsDataSetAttributesInSchema);
721
public static Exception NestedCircular(string name) => _Data(
SR
.Format(
SR
.Xml_NestedCircular, name));
722
public static Exception MultipleParentRows(string tableQName) => _Data(
SR
.Format(
SR
.Xml_MultipleParentRows, tableQName));
723
public static Exception PolymorphismNotSupported(string typeName) => _InvalidOperation(
SR
.Format(
SR
.Xml_PolymorphismNotSupported, typeName));
724
public static Exception DataTableInferenceNotSupported() => _InvalidOperation(
SR
.Xml_DataTableInferenceNotSupported);
729
string res = (null != innerException) ?
SR
.Xml_MultipleTargetConverterError :
SR
.Xml_MultipleTargetConverterEmpty;
734
public static Exception DuplicateDeclaration(string name) => _Data(
SR
.Format(
SR
.Xml_MergeDuplicateDeclaration, name));
737
public static Exception FoundEntity() => _Data(
SR
.Xml_FoundEntity);
741
public static Exception ConvertFailed(Type type1, Type type2) => _Data(
SR
.Format(
SR
.SqlConvert_ConvertFailed, type1.FullName, type2.FullName));
744
public static Exception InvalidDataTableReader(string tableName) => _InvalidOperation(
SR
.Format(
SR
.DataTableReader_InvalidDataTableReader, tableName));
745
public static Exception DataTableReaderSchemaIsInvalid(string tableName) => _InvalidOperation(
SR
.Format(
SR
.DataTableReader_SchemaInvalidDataTableReader, tableName));
746
public static Exception CannotCreateDataReaderOnEmptyDataSet() => _Argument(
SR
.DataTableReader_CannotCreateDataReaderOnEmptyDataSet);
747
public static Exception DataTableReaderArgumentIsEmpty() => _Argument(
SR
.DataTableReader_DataTableReaderArgumentIsEmpty);
748
public static Exception ArgumentContainsNullValue() => _Argument(
SR
.DataTableReader_ArgumentContainsNullValue);
749
public static Exception InvalidCurrentRowInDataTableReader() => _DeletedRowInaccessible(
SR
.DataTableReader_InvalidRowInDataTableReader);
750
public static Exception EmptyDataTableReader(string tableName) => _DeletedRowInaccessible(
SR
.Format(
SR
.DataTableReader_DataTableCleared, tableName));
751
internal static Exception InvalidDuplicateNamedSimpleTypeDelaration(string stName, string errorStr) => _Argument(
SR
.Format(
SR
.NamedSimpleType_InvalidDuplicateNamedSimpleTypeDelaration, stName, errorStr));
754
internal static Exception InternalRBTreeError(RBTreeError internalError) => _InvalidOperation(
SR
.Format(
SR
.RbTree_InvalidState, (int)internalError));
755
public static Exception EnumeratorModified() => _InvalidOperation(
SR
.RbTree_EnumerationBroken);
System\Data\DataRowComparer.cs (2)
152
throw DataSetUtil.InvalidOperation(
SR
.DataSetLinq_CannotCompareDeletedRow);
182
throw DataSetUtil.InvalidOperation(
SR
.DataSetLinq_CannotCompareDeletedRow);
System\Data\DataRowExtensions.cs (2)
178
throw DataSetUtil.InvalidCast(
SR
.Format(
SR
.DataSetLinq_NonNullableCast, typeof(T)));
System\Data\DataSet.cs (3)
3518
throw new NotSupportedException(
SR
.DataSet_XmlSerializationUnsupported);
3548
throw new NotSupportedException(
SR
.DataSet_XmlSerializationUnsupported);
3592
throw new NotSupportedException(
SR
.DataSet_XmlSerializationUnsupported);
System\Data\DataSetUtil.cs (2)
50
return ArgumentOutOfRange(
SR
.Format(
SR
.DataSetLinq_InvalidEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name);
System\Data\DataTable.cs (4)
5277
string error =
SR
.Load_ReadOnlyDataModified;
6713
throw new NotSupportedException(
SR
.DataSet_XmlSerializationUnsupported);
6748
throw new NotSupportedException(
SR
.DataSet_XmlSerializationUnsupported);
6774
throw new NotSupportedException(
SR
.DataSet_XmlSerializationUnsupported);
System\Data\DataTableExtensions.cs (4)
105
return table ?? throw DataSetUtil.InvalidOperation(
SR
.DataSetLinq_EmptyDataRowSource);
114
throw DataSetUtil.InvalidOperation(
SR
.DataSetLinq_NullDataRow);
153
throw DataSetUtil.InvalidOperation(
SR
.DataSetLinq_CannotLoadDetachedRow);
170
throw DataSetUtil.InvalidOperation(
SR
.DataSetLinq_CannotLoadDeletedRow);
System\Data\DBConcurrencyException.cs (3)
16
public DBConcurrencyException() : this(
SR
.ADP_DBConcurrencyExceptionMessage, null)
24
public DBConcurrencyException(string? message, Exception? inner) : base(message ??
SR
.ADP_DBConcurrencyExceptionMessage, inner)
29
public DBConcurrencyException(string? message, Exception? inner, DataRow[]? dataRows) : base(message ??
SR
.ADP_DBConcurrencyExceptionMessage, inner)
System\Data\EnumerableRowCollection.cs (3)
149
throw DataSetUtil.NotSupported(
SR
.ToLDVUnsupported);
167
throw DataSetUtil.NotSupported(
SR
.ToLDVUnsupported);
187
throw DataSetUtil.NotSupported(
SR
.ToLDVUnsupported);
System\Data\Filter\FilterException.cs (80)
91
return ExceptionBuilder._Argument(
SR
.Expr_InvokeArgument);
96
string err =
SR
.Format(
SR
.Expr_NYI, moreinfo);
103
return _Syntax(
SR
.Format(
SR
.Expr_MissingOperand, Operators.ToString(before._op)));
108
return _Syntax(
SR
.Format(
SR
.Expr_MissingOperand, token));
113
return _Eval(
SR
.Format(
SR
.Expr_TypeMismatch, expr));
118
return ExceptionBuilder._ArgumentOutOfRange(arg,
SR
.Format(
SR
.Expr_ArgumentOutofRange, func));
123
return _Eval(
SR
.Expr_ExpressionTooComplex);
128
return _Eval(
SR
.Format(
SR
.Expr_UnboundName, name));
133
return _Syntax(
SR
.Format(
SR
.Expr_InvalidString, str));
138
return _Eval(
SR
.Format(
SR
.Expr_UndefinedFunction, name));
143
return _Syntax(
SR
.Expr_Syntax);
148
return _Eval(
SR
.Format(
SR
.Expr_FunctionArgumentCount, name));
153
return _Syntax(
SR
.Expr_MissingRightParen);
158
return _Syntax(
SR
.Format(
SR
.Expr_UnknownToken, token, position.ToString(CultureInfo.InvariantCulture)));
163
return _Syntax(
SR
.Format(
SR
.Expr_UnknownToken1, tokExpected.ToString(), tokCurr.ToString(), position.ToString(CultureInfo.InvariantCulture)));
168
return _Eval(
SR
.Format(
SR
.Expr_DatatypeConversion, type1.ToString(), type2.ToString()));
173
return _Eval(
SR
.Format(
SR
.Expr_DatavalueConversion, value.ToString(), type.ToString()));
178
return _Syntax(
SR
.Format(
SR
.Expr_InvalidName, name));
183
return _Syntax(
SR
.Format(
SR
.Expr_InvalidDate, date));
188
return _Eval(
SR
.Expr_NonConstantArgument);
193
return _Eval(
SR
.Format(
SR
.Expr_InvalidPattern, pat));
198
return _Syntax(
SR
.Expr_InWithoutParentheses);
203
return _Syntax(
SR
.Expr_InWithoutList);
208
return _Syntax(
SR
.Expr_IsSyntax);
213
return _Overflow(
SR
.Format(
SR
.Expr_Overflow, type.Name));
218
return _Eval(
SR
.Format(
SR
.Expr_ArgumentType, function, arg.ToString(CultureInfo.InvariantCulture), type));
223
return _Eval(
SR
.Format(
SR
.Expr_ArgumentTypeInteger, function, arg.ToString(CultureInfo.InvariantCulture)));
228
return _Eval(
SR
.Format(
SR
.Expr_TypeMismatchInBinop, Operators.ToString(op), type1, type2));
233
return _Eval(
SR
.Format(
SR
.Expr_AmbiguousBinop, Operators.ToString(op), type1, type2));
238
return _Eval(
SR
.Format(
SR
.Expr_UnsupportedOperator, Operators.ToString(op)));
243
return _Syntax(
SR
.Format(
SR
.Expr_InvalidNameBracketing, name));
248
return _Syntax(
SR
.Format(
SR
.Expr_MissingOperandBefore, op));
253
return _Syntax(
SR
.Expr_TooManyRightParentheses);
258
return _Eval(
SR
.Format(
SR
.Expr_UnresolvedRelation, name, expr));
263
return _Eval(
SR
.Format(
SR
.Expr_BindFailure, relationName));
268
return _Syntax(
SR
.Expr_AggregateArgument);
273
return _Eval(
SR
.Format(
SR
.Expr_AggregateUnbound, expr));
278
return _Eval(
SR
.Expr_EvalNoContext);
283
return _Eval(
SR
.Format(
SR
.Expr_ExpressionUnbound, expr));
288
return _Eval(
SR
.Format(
SR
.Expr_ComputeNotAggregate, expr));
293
return _Eval(
SR
.Format(
SR
.Expr_FilterConversion, expr));
298
return _Syntax(
SR
.Expr_LookupArgument);
303
return _Eval(
SR
.Format(
SR
.Expr_InvalidType, typeName));
308
return _Eval(
SR
.Expr_InvalidHoursArgument);
313
return _Eval(
SR
.Expr_InvalidMinutesArgument);
318
return _Eval(
SR
.Expr_InvalidTimeZoneRange);
323
return _Eval(
SR
.Expr_MismatchKindandTimeSpan);
328
return ExceptionBuilder._Argument(
SR
.Format(
SR
.Expr_UnsupportedType, type.FullName));
System\Data\ForeignKeyConstraint.cs (2)
188
string error =
SR
.Format(
SR
.DataConstraint_ForeignKeyViolation, ConstraintName, ExceptionBuilder.KeysToString(childValues));
System\Data\LinqDataView.cs (7)
127
throw DataSetUtil.InvalidOperation(
SR
.Format(
SR
.LDV_InvalidNumOfKeys, sortExpressionBuilder.Count));
155
throw DataSetUtil.InvalidOperation(
SR
.Format(
SR
.LDV_InvalidNumOfKeys, sortExpressionBuilder.Count));
195
throw DataSetUtil.InvalidOperation(
SR
.Format(
SR
.LDV_InvalidNumOfKeys, sortExpressionBuilder.Count));
223
throw DataSetUtil.Argument(
SR
.LDVRowStateError);
System\Data\Merger.cs (21)
367
_dataSet!.RaiseMergeFailed(targetTable,
SR
.Format(
SR
.DataMerge_MissingColumnDefinition, table.TableName, src.ColumnName), _missingSchemaAction);
371
throw ExceptionBuilder.MergeFailed(
SR
.Format(
SR
.DataMerge_MissingColumnDefinition, table.TableName, src.ColumnName));
381
_dataSet!.RaiseMergeFailed(targetTable,
SR
.Format(
SR
.DataMerge_DataTypeMismatch, src.ColumnName), MissingSchemaAction.Error);
383
throw ExceptionBuilder.MergeFailed(
SR
.Format(
SR
.DataMerge_DataTypeMismatch, src.ColumnName));
417
_dataSet!.RaiseMergeFailed(targetTable,
SR
.DataMerge_PrimaryKeyMismatch, _missingSchemaAction);
427
SR
.Format(
SR
.DataMerge_PrimaryKeyColumnsMismatch, targetPKey[i].ColumnName, tablePKey[i].ColumnName),
477
SR
.Format(
SR
.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName),
503
SR
.Format(
SR
.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName),
536
SR
.Format(
SR
.DataMerge_MissingDefinition, relation.RelationName),
547
SR
.Format(
SR
.DataMerge_ReltionKeyColumnsMismatch, relation.RelationName),
557
SR
.Format(
SR
.DataMerge_ReltionKeyColumnsMismatch, relation.RelationName),
System\Data\SQLTypes\SQLBytes.cs (11)
172
throw new SqlTypeException(
SR
.SqlMisc_BufferInsufficientMessage);
267
throw new SqlTypeException(
SR
.SqlMisc_NoBufferMessage);
345
throw new SqlTypeException(
SR
.SqlMisc_NoBufferMessage);
350
throw new SqlTypeException(
SR
.SqlMisc_BufferInsufficientMessage);
353
throw new SqlTypeException(
SR
.SqlMisc_BufferInsufficientMessage);
374
throw new SqlTypeException(
SR
.SqlMisc_NoBufferMessage);
378
throw new SqlTypeException(
SR
.SqlMisc_BufferInsufficientMessage);
387
throw new SqlTypeException(
SR
.SqlMisc_BufferInsufficientMessage);
403
throw new SqlTypeException(
SR
.SqlMisc_WriteNonZeroOffsetOnNullMessage);
417
throw new SqlTypeException(
SR
.SqlMisc_WriteOffsetLargerThanLenMessage);
482
throw new SqlTypeException(
SR
.SqlMisc_WriteOffsetLargerThanLenMessage);
System\Data\SQLTypes\SQLChars.cs (8)
172
throw new SqlTypeException(
SR
.SqlMisc_BufferInsufficientMessage);
272
throw new SqlTypeException(
SR
.SqlMisc_NoBufferMessage);
344
throw new SqlTypeException(
SR
.SqlMisc_NoBufferMessage);
349
throw new SqlTypeException(
SR
.SqlMisc_BufferInsufficientMessage);
358
throw new SqlTypeException(
SR
.SqlMisc_BufferInsufficientMessage);
366
throw new SqlTypeException(
SR
.SqlMisc_WriteNonZeroOffsetOnNullMessage);
380
throw new SqlTypeException(
SR
.SqlMisc_WriteOffsetLargerThanLenMessage);
454
throw new SqlTypeException(
SR
.SqlMisc_BufferInsufficientMessage);
System\Data\SQLTypes\SQLUtility.cs (1)
31
public SqlTypeException() : this(
SR
.SqlMisc_SqlTypeMessage, null)
System\Xml\DataPointer.cs (1)
683
throw new InvalidOperationException(
SR
.DataDom_Foliation);
System\Xml\XmlDataDocument.cs (23)
105
throw new ArgumentException(
SR
.DataDom_MultipleDataSet);
384
throw new NotSupportedException(
SR
.DataDom_NotSupport_EntRef);
1076
_ => throw new InvalidOperationException(
SR
.Format(
SR
.DataDom_CloneNode, dp.NodeType.ToString())),
1173
throw new InvalidOperationException(
SR
.DataDom_MultipleLoad);
1332
throw new NotSupportedException(
SR
.DataDom_NotSupport_Clear);
1813
throw new InvalidOperationException(
SR
.DataDom_EnforceConstraintsShouldBeOff);
1867
throw new InvalidOperationException(
SR
.DataDom_EnforceConstraintsShouldBeOff);
1918
throw new InvalidOperationException(
SR
.DataDom_EnforceConstraintsShouldBeOff);
2160
throw new InvalidOperationException(
SR
.DataDom_DataSetNameChange);
2165
throw new InvalidOperationException(
SR
.DataDom_ColumnNameChange);
2167
throw new InvalidOperationException(
SR
.DataDom_ColumnNamespaceChange);
2169
throw new InvalidOperationException(
SR
.DataDom_ColumnMappingChange);
2174
throw new InvalidOperationException(
SR
.DataDom_TableNameChange);
2176
throw new InvalidOperationException(
SR
.DataDom_TableNamespaceChange);
2184
throw new InvalidOperationException(
SR
.DataDom_TableColumnsChange);
2193
throw new InvalidOperationException(
SR
.DataDom_DataSetTablesChange);
2204
throw new InvalidOperationException(
SR
.DataDom_DataSetNestedRelationsChange);
2214
throw new InvalidOperationException(
SR
.DataDom_DataSetNestedRelationsChange);
2223
throw new InvalidOperationException(
SR
.DataDom_DataSetNestedRelationsChange);
2622
throw new ArgumentException(
SR
.DataDom_DataSetNull);
2625
throw new ArgumentException(
SR
.DataDom_MultipleDataSet);
3023
throw new NotSupportedException(
SR
.DataDom_NotSupport_GetElementById);
System\Xml\XPathNodePointer.cs (1)
1309
throw new InvalidOperationException(
SR
.DataDom_Foliation);