Example #1
0
 public static ArgumentException ReadOnlyCollection(string argumentName, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentException(SR.ReadOnlyCollection(), argumentName, innerException)));
 }
Example #2
0
 public static InvalidOperationException ReadOnlyProperty(string propertyName)
 {
     return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyProperty(propertyName))));
 }
Example #3
0
 public static InvalidOperationException ReadOnlyCollection()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyCollection())));
 }
Example #4
0
 public static ArgumentException NullOrEmptyString(string argumentName)
 {
     return(Failure.Prepare(new ArgumentException(SR.NullOrEmptyStringNotValid(), argumentName)));
 }
Example #5
0
 public static InvalidOperationException OutsideEnumeration()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.OutsideEnumeration())));
 }
Example #6
0
 public static RankException RankNotOne(string arrayArgumentName)
 {
     return(Failure.Prepare(new RankException(SR.CollectionCannotCopyToMultidimensionalArray())));
 }
Example #7
0
 public static ArgumentException NullableHasNoValue(string argumentName, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentException(SR.NullableMustHaveValue(), argumentName, innerException)));
 }
Example #8
0
 public static InvalidOperationException NotAssignableFrom(Type value, Type requiredType)
 {
     return(Failure.Prepare(new InvalidOperationException(SR.NotAssignableFrom(value, requiredType))));
 }
Example #9
0
 public static InvalidOperationException Null()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.UnexpectedlyNull())));
 }
Example #10
0
 public static ArgumentNullException Null(string argumentName, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentNullException(argumentName, innerException)));
 }
Example #11
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)));
 }
Example #12
0
 public static ArgumentException NotInstanceOf(string argumentName, object argumentValue, Type requiredType, Exception innerException)
 {
     return(Failure.Prepare(new ArgumentException(SR.NotInstanceOf(requiredType), argumentName, innerException)));
 }
Example #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)));
 }
Example #14
0
 public static InvalidOperationException ReadOnlyProperty()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.ReadOnlyPropertyNoName())));
 }
Example #15
0
 public static InvalidOperationException PropertyMustBeSet(string propertyName)
 {
     return(Failure.Prepare(new InvalidOperationException(SR.PropertyMustBeSet(propertyName))));
 }
Example #16
0
 public static InvalidOperationException Sealed()
 {
     return(Failure.Prepare(new InvalidOperationException(SR.SealableReadOnly())));
 }
Example #17
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)));
 }