else {
object[] objects = array as object[];
if (objects == null) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
try {
}
}
catch(ArrayTypeMismatchException) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
}
}
else {
object[] objects = array as object[];
if (objects == null) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
int count = dictionary.count;
}
}
catch(ArrayTypeMismatchException) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
}
}
else {
object[] objects = array as object[];
if (objects == null) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
int count = dictionary.count;
}
}
catch(ArrayTypeMismatchException) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
}
}
Array.Copy(_items, 0, array, arrayIndex, _size);
}
catch(ArrayTypeMismatchException){
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
}
Type targetType = array.GetType().GetElementType();
Type sourceType = typeof(T);
if(!(targetType.IsAssignableFrom(sourceType) || sourceType.IsAssignableFrom(targetType))) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
//
//
object[] objects = array as object[];
if( objects == null) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
int count = items.Count;
}
}
catch(ArrayTypeMismatchException) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
}
}
Type targetType = array.GetType().GetElementType();
Type sourceType = typeof(T);
if(!(targetType.IsAssignableFrom(sourceType) || sourceType.IsAssignableFrom(targetType))) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
//
//
object[] objects = array as object[];
if( objects == null) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
int count = list.Count;
}
}
catch(ArrayTypeMismatchException) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
}
}
else {
object[] objects = array as object[];
if (objects == null) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
try {
}
}
catch (ArrayTypeMismatchException) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
}
}
Type targetType = array.GetType().GetElementType();
Type sourceType = typeof(T);
if (!(targetType.IsAssignableFrom(sourceType) || sourceType.IsAssignableFrom(targetType))) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
//
//
object[] objects = array as object[];
if (objects == null) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
try {
}
}
catch (ArrayTypeMismatchException) {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType();
}
}
}
}
internal static void ThrowArgumentException(ExceptionResource resource) {
- throw new ArgumentException(GetResourceString(resource));
+ throw GetArgumentException(resource);
}
internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument) {
throw new ArgumentNullException(GetArgumentName(argument));
}
- internal static void ThrowArgumentNullException(ExceptionResource resource)
- {
+ internal static void ThrowArgumentNullException(ExceptionResource resource) {
throw new ArgumentNullException(GetResourceString(resource));
}
throw new AggregateException(exceptions);
}
+ internal static void ThrowArgumentException_Argument_InvalidArrayType() {
+ throw GetArgumentException(ExceptionResource.Argument_InvalidArrayType);
+ }
internal static void ThrowInvalidOperationException_InvalidOperation_EnumNotStarted() {
throw GetInvalidOperationException(ExceptionResource.InvalidOperation_EnumNotStarted);
throw GetInvalidOperationException(ExceptionResource.InvalidOperation_EnumOpCantHappen);
}
+ private static ArgumentException GetArgumentException(ExceptionResource resource) {
+ return new ArgumentException(GetResourceString(resource));
+ }
private static InvalidOperationException GetInvalidOperationException(ExceptionResource resource) {
return new InvalidOperationException(GetResourceString(resource));