System.Data.Common.ADP.InvalidEnumerationValue(System.Type, int)

Here are the examples of the csharp api class System.Data.Common.ADP.InvalidEnumerationValue(System.Type, int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

20 Examples 7

1. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidAcceptRejectRule(AcceptRejectRule value) {
#if DEBUG
            switch(value) {
            case AcceptRejectRule.None:
            case AcceptRejectRule.Cascade:
                Debug.Assert(false, "valid AcceptRejectRule " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(AcceptRejectRule), (int) value);
        }

2. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidCatalogLocation(CatalogLocation value) {
#if DEBUG
            switch(value) {
            case CatalogLocation.Start:
            case CatalogLocation.End:
                Debug.Assert(false, "valid CatalogLocation " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(CatalogLocation), (int) value);
        }

3. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidCommandBehavior(CommandBehavior value) {
#if DEBUG
            if ((0 <= (int)value) && ((int)value <= 0x3F)) {
                Debug.Assert(false, "valid CommandType " + value.ToString());
            }
#endif
            return InvalidEnumerationValue(typeof(CommandBehavior), (int) value);
        }

4. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidCommandType(CommandType value) {
#if DEBUG
            switch(value) {
            case CommandType.Text:
            case CommandType.StoredProcedure:
            case CommandType.TableDirect:
                Debug.Assert(false, "valid CommandType " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(CommandType), (int) value);
        }

5. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidConflictOptions(ConflictOption value) {
#if DEBUG
            switch(value) {
            case ConflictOption.CompareAllSearchableValues:
            case ConflictOption.CompareRowVersion:
            case ConflictOption.OverwriteChanges:
                Debug.Assert(false, "valid ConflictOption " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(ConflictOption), (int) value);
        }

6. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidDataRowState(DataRowState value) {
#if DEBUG
            switch(value) {
            case DataRowState.Detached:
            case DataRowState.Unchanged:
            case DataRowState.Added:
            case DataRowState.Deleted:
            case DataRowState.Modified:
                Debug.Assert(false, "valid DataRowState " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(DataRowState), (int) value);
        }

7. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidDataRowVersion(DataRowVersion value) {
#if DEBUG
            switch(value) {
            case DataRowVersion.Default:
            case DataRowVersion.Current:
            case DataRowVersion.Original:
            case DataRowVersion.Proposed:
                Debug.Assert(false, "valid DataRowVersion " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(DataRowVersion), (int) value);
        }

8. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidIsolationLevel(IsolationLevel value) {
#if DEBUG
            switch(value) {
            case IsolationLevel.Unspecified:
            case IsolationLevel.Chaos:
            case IsolationLevel.ReadUncommitted:
            case IsolationLevel.ReadCommitted:
            case IsolationLevel.RepeatableRead:
            case IsolationLevel.Serializable:
            case IsolationLevel.Snapshot:
                Debug.Assert(false, "valid IsolationLevel " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(IsolationLevel), (int) value);
        }

9. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidKeyRestrictionBehavior(KeyRestrictionBehavior value) {
#if DEBUG
            switch(value) {
            case KeyRestrictionBehavior.PreventUsage:
            case KeyRestrictionBehavior.AllowOnly:
                Debug.Assert(false, "valid KeyRestrictionBehavior " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(KeyRestrictionBehavior), (int) value);
        }

10. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidLoadOption(LoadOption value) {
#if DEBUG
            switch(value) {
            case LoadOption.OverwriteChanges:
            case LoadOption.PreserveChanges:
            case LoadOption.Upsert:
                Debug.Assert(false, "valid LoadOption " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(LoadOption), (int) value);
        }

11. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidMissingMappingAction(MissingMappingAction value) {
#if DEBUG
            switch(value) {
            case MissingMappingAction.Passthrough:
            case MissingMappingAction.Ignore:
            case MissingMappingAction.Error:
                Debug.Assert(false, "valid MissingMappingAction " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(MissingMappingAction), (int) value);
        }

12. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidMissingSchemaAction(MissingSchemaAction value) {
#if DEBUG
            switch(value) {
            case MissingSchemaAction.Add:
            case MissingSchemaAction.Ignore:
            case MissingSchemaAction.Error:
            case MissingSchemaAction.AddWithKey:
                Debug.Assert(false, "valid MissingSchemaAction " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(MissingSchemaAction), (int) value);
        }

13. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidParameterDirection(ParameterDirection value) {
#if DEBUG
            switch(value) {
            case ParameterDirection.Input:
            case ParameterDirection.Output:
            case ParameterDirection.InputOutput:
            case ParameterDirection.ReturnValue:
                Debug.Assert(false, "valid ParameterDirection " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(ParameterDirection), (int) value);
        }

14. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidPermissionState(PermissionState value) {
#if DEBUG
            switch(value) {
            case PermissionState.Unrestricted:
            case PermissionState.None:
                Debug.Assert(false, "valid PermissionState " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(PermissionState), (int) value);
        }

15. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidRule(Rule value) {
#if DEBUG
            switch(value) {
            case Rule.None:
            case Rule.Cascade:
            case Rule.SetNull:
            case Rule.SetDefault:
                Debug.Assert(false, "valid Rule " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(Rule), (int) value);
        }

16. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidSchemaType(SchemaType value) {
#if DEBUG
            switch(value) {
            case SchemaType.Source:
            case SchemaType.Mapped:
                Debug.Assert(false, "valid SchemaType " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(SchemaType), (int) value);
        }

17. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidStatementType(StatementType value) {
#if DEBUG
            switch(value) {
            case StatementType.Select:
            case StatementType.Insert:
            case StatementType.Update:
            case StatementType.Delete:
            case StatementType.Batch:
                 Debug.Assert(false, "valid StatementType " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(StatementType), (int) value);
        }

18. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidUpdateRowSource(UpdateRowSource value) {
#if DEBUG
            switch(value) {
            case UpdateRowSource.None:
            case UpdateRowSource.OutputParameters:
            case UpdateRowSource.FirstReturnedRecord:
            case UpdateRowSource.Both:
                Debug.Assert(false, "valid UpdateRowSource " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(UpdateRowSource), (int) value);
        }

19. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidUpdateStatus(UpdateStatus value) {
#if DEBUG
            switch(value) {
            case UpdateStatus.Continue:
            case UpdateStatus.ErrorsOccurred:
            case UpdateStatus.SkipAllRemainingRows:
            case UpdateStatus.SkipCurrentRow:
                Debug.Assert(false, "valid UpdateStatus " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(UpdateStatus), (int) value);
        }

20. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal ArgumentOutOfRangeException InvalidUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value) {
#if DEBUG
            switch(value) {
            case Microsoft.SqlServer.Server.Format.Unknown:
            case Microsoft.SqlServer.Server.Format.Native:
            case Microsoft.SqlServer.Server.Format.UserDefined:
                Debug.Assert(false, "valid UserDefinedTypeSerializationFormat " + value.ToString());
                break;
            }
#endif
            return InvalidEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), (int) value);
        }