static private GetResourceString ( string resourceKey, string defaultString ) : string | ||
resourceKey | string | |
defaultString | string | |
리턴 | string |
internal Exception GetGuidParseException() { switch (_failure) { case ParseFailureKind.ArgumentNull: return(new ArgumentNullException(_failureArgumentName, SR.GetResourceString(_failureMessageID))); case ParseFailureKind.FormatWithInnerException: return(new FormatException(SR.GetResourceString(_failureMessageID), _innerException)); case ParseFailureKind.FormatWithParameter: return(new FormatException(SR.Format(SR.GetResourceString(_failureMessageID), _failureMessageFormatArgument))); case ParseFailureKind.Format: return(new FormatException(SR.GetResourceString(_failureMessageID))); case ParseFailureKind.NativeException: return(_innerException); default: Debug.Assert(false, "Unknown GuidParseFailure: " + _failure); return(new FormatException(SR.Format_GuidUnrecognized)); } }
// Looks up the resource string value for key. // // if you change this method's signature then you must change the code that calls it // in excep.cpp and probably you will have to visit mscorlib.h to add the new signature // as well as metasig.h to create the new signature type internal static String GetResourceStringLocal(String key) { return(SR.GetResourceString(key)); }
// If you change this method's signature then you must change the code that calls it // in excep.cpp and probably you will have to visit mscorlib.h to add the new signature // as well as metasig.h to create the new signature type internal static string GetResourceStringLocal(string key) => SR.GetResourceString(key);
private AppDomain() { throw new NotSupportedException(SR.GetResourceString(ResId.NotSupported_Constructor)); }
protected override string GetLocalizedString(string value) { return(SR.GetResourceString(value, "")); }
internal static void ThrowNotSupportedException(ExceptionResource resource) { throw new NotSupportedException(SR.GetResourceString(GetResourceName(resource))); }
internal static void ThrowUnauthorizedAccessException(ExceptionResource resource) { throw new UnauthorizedAccessException(SR.GetResourceString(GetResourceName(resource))); }
internal static void ThrowSerializationException(ExceptionResource resource) { throw new SerializationException(SR.GetResourceString(GetResourceName(resource))); }
internal static void ThrowSecurityException(ExceptionResource resource) { throw new System.Security.SecurityException(SR.GetResourceString(GetResourceName(resource))); }
internal static void ThrowInvalidOperationException(ExceptionResource resource) { throw new InvalidOperationException(SR.GetResourceString(GetResourceName(resource))); }
internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) { throw new ArgumentOutOfRangeException(GetArgumentName(argument), SR.GetResourceString(GetResourceName(resource))); }
internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument) { throw new ArgumentException(SR.GetResourceString(GetResourceName(resource)), GetArgumentName(argument)); }
internal static void ThrowArgumentException(ExceptionResource resource) { throw new ArgumentException(SR.GetResourceString(GetResourceName(resource))); }
internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource) { throw new ObjectDisposedException(objectName, SR.GetResourceString(GetResourceName(resource))); }