Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetResourceString()

static string System.ThrowHelper.GetResourceString ( ExceptionResource resource)
inlinestaticprivate

Definition at line 618 of file ThrowHelper.cs.

619 {
620 return resource switch
621 {
622 ExceptionResource.ArgumentOutOfRange_Index => SR.ArgumentOutOfRange_Index,
623 ExceptionResource.ArgumentOutOfRange_IndexCount => SR.ArgumentOutOfRange_IndexCount,
624 ExceptionResource.ArgumentOutOfRange_IndexCountBuffer => SR.ArgumentOutOfRange_IndexCountBuffer,
625 ExceptionResource.ArgumentOutOfRange_Count => SR.ArgumentOutOfRange_Count,
626 ExceptionResource.ArgumentOutOfRange_Year => SR.ArgumentOutOfRange_Year,
627 ExceptionResource.Arg_ArrayPlusOffTooSmall => SR.Arg_ArrayPlusOffTooSmall,
628 ExceptionResource.NotSupported_ReadOnlyCollection => SR.NotSupported_ReadOnlyCollection,
629 ExceptionResource.Arg_RankMultiDimNotSupported => SR.Arg_RankMultiDimNotSupported,
630 ExceptionResource.Arg_NonZeroLowerBound => SR.Arg_NonZeroLowerBound,
631 ExceptionResource.ArgumentOutOfRange_GetCharCountOverflow => SR.ArgumentOutOfRange_GetCharCountOverflow,
632 ExceptionResource.ArgumentOutOfRange_ListInsert => SR.ArgumentOutOfRange_ListInsert,
633 ExceptionResource.ArgumentOutOfRange_NeedNonNegNum => SR.ArgumentOutOfRange_NeedNonNegNum,
634 ExceptionResource.ArgumentOutOfRange_SmallCapacity => SR.ArgumentOutOfRange_SmallCapacity,
635 ExceptionResource.Argument_InvalidOffLen => SR.Argument_InvalidOffLen,
636 ExceptionResource.Argument_CannotExtractScalar => SR.Argument_CannotExtractScalar,
637 ExceptionResource.ArgumentOutOfRange_BiggerThanCollection => SR.ArgumentOutOfRange_BiggerThanCollection,
638 ExceptionResource.Serialization_MissingKeys => SR.Serialization_MissingKeys,
639 ExceptionResource.Serialization_NullKey => SR.Serialization_NullKey,
640 ExceptionResource.NotSupported_KeyCollectionSet => SR.NotSupported_KeyCollectionSet,
641 ExceptionResource.NotSupported_ValueCollectionSet => SR.NotSupported_ValueCollectionSet,
642 ExceptionResource.InvalidOperation_NullArray => SR.InvalidOperation_NullArray,
643 ExceptionResource.TaskT_TransitionToFinal_AlreadyCompleted => SR.TaskT_TransitionToFinal_AlreadyCompleted,
644 ExceptionResource.TaskCompletionSourceT_TrySetException_NullException => SR.TaskCompletionSourceT_TrySetException_NullException,
645 ExceptionResource.TaskCompletionSourceT_TrySetException_NoExceptions => SR.TaskCompletionSourceT_TrySetException_NoExceptions,
646 ExceptionResource.NotSupported_StringComparison => SR.NotSupported_StringComparison,
647 ExceptionResource.ConcurrentCollection_SyncRoot_NotSupported => SR.ConcurrentCollection_SyncRoot_NotSupported,
648 ExceptionResource.Task_MultiTaskContinuation_NullTask => SR.Task_MultiTaskContinuation_NullTask,
649 ExceptionResource.InvalidOperation_WrongAsyncResultOrEndCalledMultiple => SR.InvalidOperation_WrongAsyncResultOrEndCalledMultiple,
650 ExceptionResource.Task_MultiTaskContinuation_EmptyTaskList => SR.Task_MultiTaskContinuation_EmptyTaskList,
651 ExceptionResource.Task_Start_TaskCompleted => SR.Task_Start_TaskCompleted,
652 ExceptionResource.Task_Start_Promise => SR.Task_Start_Promise,
653 ExceptionResource.Task_Start_ContinuationTask => SR.Task_Start_ContinuationTask,
654 ExceptionResource.Task_Start_AlreadyStarted => SR.Task_Start_AlreadyStarted,
655 ExceptionResource.Task_RunSynchronously_Continuation => SR.Task_RunSynchronously_Continuation,
656 ExceptionResource.Task_RunSynchronously_Promise => SR.Task_RunSynchronously_Promise,
657 ExceptionResource.Task_RunSynchronously_TaskCompleted => SR.Task_RunSynchronously_TaskCompleted,
658 ExceptionResource.Task_RunSynchronously_AlreadyStarted => SR.Task_RunSynchronously_AlreadyStarted,
659 ExceptionResource.AsyncMethodBuilder_InstanceNotInitialized => SR.AsyncMethodBuilder_InstanceNotInitialized,
660 ExceptionResource.Task_ContinueWith_ESandLR => SR.Task_ContinueWith_ESandLR,
661 ExceptionResource.Task_ContinueWith_NotOnAnything => SR.Task_ContinueWith_NotOnAnything,
662 ExceptionResource.Task_InvalidTimerTimeSpan => SR.Task_InvalidTimerTimeSpan,
663 ExceptionResource.Task_Delay_InvalidMillisecondsDelay => SR.Task_Delay_InvalidMillisecondsDelay,
664 ExceptionResource.Task_Dispose_NotCompleted => SR.Task_Dispose_NotCompleted,
665 ExceptionResource.Task_ThrowIfDisposed => SR.Task_ThrowIfDisposed,
666 ExceptionResource.Task_WaitMulti_NullTask => SR.Task_WaitMulti_NullTask,
667 ExceptionResource.ArgumentException_OtherNotArrayOfCorrectLength => SR.ArgumentException_OtherNotArrayOfCorrectLength,
668 ExceptionResource.ArgumentNull_Array => SR.ArgumentNull_Array,
669 ExceptionResource.ArgumentNull_SafeHandle => SR.ArgumentNull_SafeHandle,
670 ExceptionResource.ArgumentOutOfRange_EndIndexStartIndex => SR.ArgumentOutOfRange_EndIndexStartIndex,
671 ExceptionResource.ArgumentOutOfRange_Enum => SR.ArgumentOutOfRange_Enum,
672 ExceptionResource.ArgumentOutOfRange_HugeArrayNotSupported => SR.ArgumentOutOfRange_HugeArrayNotSupported,
673 ExceptionResource.Argument_AddingDuplicate => SR.Argument_AddingDuplicate,
674 ExceptionResource.Argument_InvalidArgumentForComparison => SR.Argument_InvalidArgumentForComparison,
675 ExceptionResource.Arg_LowerBoundsMustMatch => SR.Arg_LowerBoundsMustMatch,
676 ExceptionResource.Arg_MustBeType => SR.Arg_MustBeType,
677 ExceptionResource.Arg_Need1DArray => SR.Arg_Need1DArray,
678 ExceptionResource.Arg_Need2DArray => SR.Arg_Need2DArray,
679 ExceptionResource.Arg_Need3DArray => SR.Arg_Need3DArray,
680 ExceptionResource.Arg_NeedAtLeast1Rank => SR.Arg_NeedAtLeast1Rank,
681 ExceptionResource.Arg_RankIndices => SR.Arg_RankIndices,
682 ExceptionResource.Arg_RanksAndBounds => SR.Arg_RanksAndBounds,
683 ExceptionResource.InvalidOperation_IComparerFailed => SR.InvalidOperation_IComparerFailed,
684 ExceptionResource.NotSupported_FixedSizeCollection => SR.NotSupported_FixedSizeCollection,
685 ExceptionResource.Rank_MultiDimNotSupported => SR.Rank_MultiDimNotSupported,
686 ExceptionResource.Arg_TypeNotSupported => SR.Arg_TypeNotSupported,
687 ExceptionResource.Argument_SpansMustHaveSameLength => SR.Argument_SpansMustHaveSameLength,
688 ExceptionResource.Argument_InvalidFlag => SR.Argument_InvalidFlag,
689 ExceptionResource.CancellationTokenSource_Disposed => SR.CancellationTokenSource_Disposed,
690 ExceptionResource.Argument_AlignmentMustBePow2 => SR.Argument_AlignmentMustBePow2,
691 _ => "",
692 };
693 }

References System.SR.Arg_ArrayPlusOffTooSmall, System.SR.Arg_LowerBoundsMustMatch, System.SR.Arg_MustBeType, System.SR.Arg_Need1DArray, System.SR.Arg_Need2DArray, System.SR.Arg_Need3DArray, System.SR.Arg_NeedAtLeast1Rank, System.SR.Arg_NonZeroLowerBound, System.SR.Arg_RankIndices, System.SR.Arg_RankMultiDimNotSupported, System.SR.Arg_RanksAndBounds, System.SR.Arg_TypeNotSupported, System.SR.Argument_AddingDuplicate, System.SR.Argument_AlignmentMustBePow2, System.SR.Argument_CannotExtractScalar, System.SR.Argument_InvalidArgumentForComparison, System.SR.Argument_InvalidFlag, System.SR.Argument_InvalidOffLen, System.SR.Argument_SpansMustHaveSameLength, System.SR.ArgumentException_OtherNotArrayOfCorrectLength, System.SR.ArgumentNull_Array, System.SR.ArgumentNull_SafeHandle, System.SR.ArgumentOutOfRange_BiggerThanCollection, System.SR.ArgumentOutOfRange_Count, System.SR.ArgumentOutOfRange_EndIndexStartIndex, System.SR.ArgumentOutOfRange_Enum, System.SR.ArgumentOutOfRange_GetCharCountOverflow, System.SR.ArgumentOutOfRange_HugeArrayNotSupported, System.SR.ArgumentOutOfRange_Index, System.SR.ArgumentOutOfRange_IndexCount, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_ListInsert, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.SR.ArgumentOutOfRange_SmallCapacity, System.SR.ArgumentOutOfRange_Year, System.SR.AsyncMethodBuilder_InstanceNotInitialized, System.SR.CancellationTokenSource_Disposed, System.SR.ConcurrentCollection_SyncRoot_NotSupported, System.Runtime.Serialization.Dictionary, System.SR.InvalidOperation_IComparerFailed, System.SR.InvalidOperation_NullArray, System.SR.InvalidOperation_WrongAsyncResultOrEndCalledMultiple, System.SR.NotSupported_FixedSizeCollection, System.SR.NotSupported_KeyCollectionSet, System.SR.NotSupported_ReadOnlyCollection, System.SR.NotSupported_StringComparison, System.SR.NotSupported_ValueCollectionSet, System.SR.Rank_MultiDimNotSupported, System.SR.Serialization_MissingKeys, System.SR.Serialization_NullKey, System.SR.Task_ContinueWith_ESandLR, System.SR.Task_ContinueWith_NotOnAnything, System.SR.Task_Delay_InvalidMillisecondsDelay, System.SR.Task_Dispose_NotCompleted, System.SR.Task_InvalidTimerTimeSpan, System.SR.Task_MultiTaskContinuation_EmptyTaskList, System.SR.Task_MultiTaskContinuation_NullTask, System.SR.Task_RunSynchronously_AlreadyStarted, System.SR.Task_RunSynchronously_Continuation, System.SR.Task_RunSynchronously_Promise, System.SR.Task_RunSynchronously_TaskCompleted, System.SR.Task_Start_AlreadyStarted, System.SR.Task_Start_ContinuationTask, System.SR.Task_Start_Promise, System.SR.Task_Start_TaskCompleted, System.SR.Task_ThrowIfDisposed, System.SR.Task_WaitMulti_NullTask, System.SR.TaskCompletionSourceT_TrySetException_NoExceptions, System.SR.TaskCompletionSourceT_TrySetException_NullException, and System.SR.TaskT_TransitionToFinal_AlreadyCompleted.

Referenced by System.ThrowHelper.GetArgumentException(), System.ThrowHelper.GetArgumentException(), System.ThrowHelper.GetArgumentOutOfRangeException(), System.ThrowHelper.GetArgumentOutOfRangeException(), System.ThrowHelper.GetInvalidOperationException(), System.ThrowHelper.ThrowArgumentNullException(), System.ThrowHelper.ThrowInvalidOperationException(), System.ThrowHelper.ThrowNotSupportedException(), System.ThrowHelper.ThrowObjectDisposedException(), System.ThrowHelper.ThrowRankException(), and System.ThrowHelper.ThrowSerializationException().