Esempio n. 1
0
 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)));
 }
Esempio n. 2
0
 public static ArgumentException CollectionElementMissing(string argumentName, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentException(SR.ItemRequiredToExistInCollection(),
                                                  argumentName, innerException)));
 }
Esempio n. 3
0
 public static InvalidOperationException CollectionModified()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.Modified())));
 }
Esempio n. 4
0
 public static InvalidOperationException AlreadyInitialized(Exception innerException)
 {
     return(Failure.Prepare(new InvalidOperationException(SR.AlreadyInitialized(), innerException)));
 }
Esempio n. 5
0
 public static ObjectDisposedException Closed(string objectName)
 {
     return(Failure.Prepare(new ObjectDisposedException(objectName, SR.Closed())));
 }
Esempio n. 6
0
 public static NotSupportedException StreamSeekNotSupported()
 {
     return(Failure.Prepare(new NotSupportedException(SR.CannotSeekOrSetPosition())));
 }
Esempio n. 7
0
 public static ArgumentException AllWhitespace(string argumentName)
 {
     return(Failure.Prepare(new ArgumentException(SR.AllWhitespace(), argumentName)));
 }
Esempio n. 8
0
 public static ArgumentNullException Null(string argumentName, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentNullException(argumentName, innerException)));
 }
Esempio n. 9
0
 public static ArgumentException NullableHasNoValue(string argumentName, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentException(SR.NullableMustHaveValue(), argumentName, innerException)));
 }
Esempio n. 10
0
 public static ArgumentException NotSubclassOf(string argumentName, object argumentValue, Type requiredType, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentException(SR.NotSubclassOf(GetTypeString(argumentValue), requiredType), argumentName, innerException)));
 }
Esempio n. 11
0
 public static InvalidOperationException Null()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.UnexpectedlyNull())));
 }
Esempio n. 12
0
 public static ArgumentException NotInstanceOf(string argumentName, object argumentValue, Type requiredType, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentException(SR.NotInstanceOf(requiredType), argumentName, innerException)));
 }
Esempio n. 13
0
 public static ArgumentException NotAssignableFrom(string argumentName, Type requiredType, Type argumentValue, Exception innerException = null)
 {
     return(Failure.Prepare(new ArgumentException(SR.NotAssignableFrom(argumentValue, requiredType), argumentName, innerException)));
 }
Esempio n. 14
0
 public static InvalidOperationException NotAssignableFrom(Type value, Type requiredType)
 {
     return(Failure.Prepare(new InvalidOperationException(SR.NotAssignableFrom(value, requiredType))));
 }
Esempio n. 15
0
 public static InvalidOperationException ReadOnlyProperty()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyPropertyNoName())));
 }
Esempio n. 16
0
 public static InvalidOperationException PropertyMustBeSet(string propertyName)
 {
     return(Failure.Prepare(new InvalidOperationException(SR.PropertyMustBeSet(propertyName))));
 }
Esempio n. 17
0
 public static InvalidOperationException Sealed()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.SealableReadOnly())));
 }
Esempio n. 18
0
 public static InvalidOperationException OutsideEnumeration()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.OutsideEnumeration())));
 }
Esempio n. 19
0
 public static ArgumentOutOfRangeException Zero(string argumentName, object argumentValue)
 {
     return(Failure.Prepare(new ArgumentOutOfRangeException(argumentName, argumentValue, SR.CannotBeZero())));
 }
Esempio n. 20
0
 public static RankException RankNotOne(string arrayArgumentName)
 {
     return(Failure.Prepare(new RankException(SR.CollectionCannotCopyToMultidimensionalArray())));
 }
Esempio n. 21
0
 public static ArgumentException NotCompliantIdentifier(string argumentName, string argumentValue)
 {
     return(Failure.Prepare(new ArgumentOutOfRangeException(argumentName, argumentValue, SR.NotCompliantIdentifier2())));
 }
Esempio n. 22
0
 public static InvalidOperationException ReadOnlyCollection()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyCollection())));
 }
Esempio n. 23
0
 public static ArgumentException CollectionContainsNullElement(string argumentName)
 {
     return(Failure.Prepare(new ArgumentException(SR.CollectionContainsNullElement(), argumentName)));
 }
Esempio n. 24
0
 public static ArgumentException NullOrEmptyString(string argumentName)
 {
     return(Failure.Prepare(new ArgumentException(SR.NullOrEmptyStringNotValid(), argumentName)));
 }
Esempio n. 25
0
 public static ObjectDisposedException Closed()
 {
     return(Failure.Prepare(new ObjectDisposedException(null, SR.Closed())));
 }
Esempio n. 26
0
 public static ArgumentException ReadOnlyCollection(string argumentName, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentException(SR.ReadOnlyCollection(), argumentName, innerException)));
 }
Esempio n. 27
0
 public static NotSupportedException CollectionFixedSize()
 {
     return(Failure.Prepare(new NotSupportedException(SR.CollectionFixedSize())));
 }
Esempio n. 28
0
 public static InvalidOperationException ReadOnlyProperty(string propertyName)
 {
     return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyProperty(propertyName))));
 }
Esempio n. 29
0
 public static ArgumentException ComparisonOperandsMustMatch()
 {
     return(Failure.Prepare(new ArgumentException(SR.ComparisonOperandsMustMatch())));
 }
Esempio n. 30
0
 public static InvalidOperationException NotAdaptableTo(object value, Type requiredType)
 {
     return(Failure.Prepare(new InvalidOperationException(SR.TypeNotCastableAdaptable(GetTypeString(value), requiredType))));
 }