public static ArgumentException ReadOnlyCollection(string argumentName, Exception innerException) { return(Failure.Prepare(new ArgumentException(SR.ReadOnlyCollection(), argumentName, innerException))); }
public static InvalidOperationException ReadOnlyProperty(string propertyName) { return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyProperty(propertyName)))); }
public static InvalidOperationException ReadOnlyCollection() { return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyCollection()))); }
public static ArgumentException NullOrEmptyString(string argumentName) { return(Failure.Prepare(new ArgumentException(SR.NullOrEmptyStringNotValid(), argumentName))); }
public static InvalidOperationException OutsideEnumeration() { return(Failure.Prepare(new InvalidOperationException(SR.OutsideEnumeration()))); }
public static RankException RankNotOne(string arrayArgumentName) { return(Failure.Prepare(new RankException(SR.CollectionCannotCopyToMultidimensionalArray()))); }
public static ArgumentException NullableHasNoValue(string argumentName, Exception innerException) { return(Failure.Prepare(new ArgumentException(SR.NullableMustHaveValue(), argumentName, innerException))); }
public static InvalidOperationException NotAssignableFrom(Type value, Type requiredType) { return(Failure.Prepare(new InvalidOperationException(SR.NotAssignableFrom(value, requiredType)))); }
public static InvalidOperationException Null() { return(Failure.Prepare(new InvalidOperationException(SR.UnexpectedlyNull()))); }
public static ArgumentNullException Null(string argumentName, Exception innerException) { return(Failure.Prepare(new ArgumentNullException(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 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 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 ArgumentException NotAdaptableTo(string argumentName, object argumentValue, Type requiredType, Exception innerException = null) { return(Failure.Prepare(new ArgumentException(SR.TypeNotCastableAdaptable(GetTypeString(argumentValue), requiredType), argumentName, innerException))); }