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