public static ArgumentException NotAdaptableTo(string argumentName, object argumentValue, Type requiredType, Exception innerException = null) { return(Failure.Prepare(new ArgumentException(SR.TypeNotCastableAdaptable(GetTypeString(argumentValue), requiredType), argumentName, innerException))); }
public static ArgumentException CollectionElementMissing(string argumentName, Exception innerException) { return(Failure.Prepare(new ArgumentException(SR.ItemRequiredToExistInCollection(), argumentName, innerException))); }
public static InvalidOperationException CollectionModified() { return(Failure.Prepare(new InvalidOperationException(SR.Modified()))); }
public static InvalidOperationException AlreadyInitialized(Exception innerException) { return(Failure.Prepare(new InvalidOperationException(SR.AlreadyInitialized(), innerException))); }
public static ObjectDisposedException Closed(string objectName) { return(Failure.Prepare(new ObjectDisposedException(objectName, SR.Closed()))); }
public static NotSupportedException StreamSeekNotSupported() { return(Failure.Prepare(new NotSupportedException(SR.CannotSeekOrSetPosition()))); }
public static ArgumentException AllWhitespace(string argumentName) { return(Failure.Prepare(new ArgumentException(SR.AllWhitespace(), argumentName))); }
public static ArgumentNullException Null(string argumentName, Exception innerException) { return(Failure.Prepare(new ArgumentNullException(argumentName, innerException))); }
public static ArgumentException NullableHasNoValue(string argumentName, Exception innerException) { return(Failure.Prepare(new ArgumentException(SR.NullableMustHaveValue(), argumentName, innerException))); }
public static ArgumentException NotSubclassOf(string argumentName, object argumentValue, Type requiredType, Exception innerException) { return(Failure.Prepare(new ArgumentException(SR.NotSubclassOf(GetTypeString(argumentValue), requiredType), argumentName, innerException))); }
public static InvalidOperationException Null() { return(Failure.Prepare(new InvalidOperationException(SR.UnexpectedlyNull()))); }
public static ArgumentException NotInstanceOf(string argumentName, object argumentValue, Type requiredType, Exception innerException) { return(Failure.Prepare(new ArgumentException(SR.NotInstanceOf(requiredType), argumentName, innerException))); }
public static ArgumentException NotAssignableFrom(string argumentName, Type requiredType, Type argumentValue, Exception innerException = null) { return(Failure.Prepare(new ArgumentException(SR.NotAssignableFrom(argumentValue, requiredType), argumentName, innerException))); }
public static InvalidOperationException NotAssignableFrom(Type value, Type requiredType) { return(Failure.Prepare(new InvalidOperationException(SR.NotAssignableFrom(value, requiredType)))); }
public static InvalidOperationException ReadOnlyProperty() { return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyPropertyNoName()))); }
public static InvalidOperationException PropertyMustBeSet(string propertyName) { return(Failure.Prepare(new InvalidOperationException(SR.PropertyMustBeSet(propertyName)))); }
public static InvalidOperationException Sealed() { return(Failure.Prepare(new InvalidOperationException(SR.SealableReadOnly()))); }
public static InvalidOperationException OutsideEnumeration() { return(Failure.Prepare(new InvalidOperationException(SR.OutsideEnumeration()))); }
public static ArgumentOutOfRangeException Zero(string argumentName, object argumentValue) { return(Failure.Prepare(new ArgumentOutOfRangeException(argumentName, argumentValue, SR.CannotBeZero()))); }
public static RankException RankNotOne(string arrayArgumentName) { return(Failure.Prepare(new RankException(SR.CollectionCannotCopyToMultidimensionalArray()))); }
public static ArgumentException NotCompliantIdentifier(string argumentName, string argumentValue) { return(Failure.Prepare(new ArgumentOutOfRangeException(argumentName, argumentValue, SR.NotCompliantIdentifier2()))); }
public static InvalidOperationException ReadOnlyCollection() { return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyCollection()))); }
public static ArgumentException CollectionContainsNullElement(string argumentName) { return(Failure.Prepare(new ArgumentException(SR.CollectionContainsNullElement(), argumentName))); }
public static ArgumentException NullOrEmptyString(string argumentName) { return(Failure.Prepare(new ArgumentException(SR.NullOrEmptyStringNotValid(), argumentName))); }
public static ObjectDisposedException Closed() { return(Failure.Prepare(new ObjectDisposedException(null, SR.Closed()))); }
public static ArgumentException ReadOnlyCollection(string argumentName, Exception innerException) { return(Failure.Prepare(new ArgumentException(SR.ReadOnlyCollection(), argumentName, innerException))); }
public static NotSupportedException CollectionFixedSize() { return(Failure.Prepare(new NotSupportedException(SR.CollectionFixedSize()))); }
public static InvalidOperationException ReadOnlyProperty(string propertyName) { return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyProperty(propertyName)))); }
public static ArgumentException ComparisonOperandsMustMatch() { return(Failure.Prepare(new ArgumentException(SR.ComparisonOperandsMustMatch()))); }
public static InvalidOperationException NotAdaptableTo(object value, Type requiredType) { return(Failure.Prepare(new InvalidOperationException(SR.TypeNotCastableAdaptable(GetTypeString(value), requiredType)))); }