GetResourceString() static private method

static private GetResourceString ( string resourceKey, string defaultString ) : string
resourceKey string
defaultString string
return string
Ejemplo n.º 1
0
            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));
                }
            }
Ejemplo n.º 2
0
 // 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));
 }
Ejemplo n.º 3
0
 // 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);
Ejemplo n.º 4
0
 private AppDomain()
 {
     throw new NotSupportedException(SR.GetResourceString(ResId.NotSupported_Constructor));
 }
Ejemplo n.º 5
0
 protected override string GetLocalizedString(string value)
 {
     return(SR.GetResourceString(value, ""));
 }
Ejemplo n.º 6
0
 internal static void ThrowNotSupportedException(ExceptionResource resource)
 {
     throw new NotSupportedException(SR.GetResourceString(GetResourceName(resource)));
 }
Ejemplo n.º 7
0
 internal static void ThrowUnauthorizedAccessException(ExceptionResource resource)
 {
     throw new UnauthorizedAccessException(SR.GetResourceString(GetResourceName(resource)));
 }
Ejemplo n.º 8
0
 internal static void ThrowSerializationException(ExceptionResource resource)
 {
     throw new SerializationException(SR.GetResourceString(GetResourceName(resource)));
 }
Ejemplo n.º 9
0
 internal static void  ThrowSecurityException(ExceptionResource resource)
 {
     throw new System.Security.SecurityException(SR.GetResourceString(GetResourceName(resource)));
 }
Ejemplo n.º 10
0
 internal static void ThrowInvalidOperationException(ExceptionResource resource)
 {
     throw new InvalidOperationException(SR.GetResourceString(GetResourceName(resource)));
 }
Ejemplo n.º 11
0
 internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
 {
     throw new ArgumentOutOfRangeException(GetArgumentName(argument),
                                           SR.GetResourceString(GetResourceName(resource)));
 }
Ejemplo n.º 12
0
 internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument)
 {
     throw new ArgumentException(SR.GetResourceString(GetResourceName(resource)), GetArgumentName(argument));
 }
Ejemplo n.º 13
0
 internal static void ThrowArgumentException(ExceptionResource resource)
 {
     throw new ArgumentException(SR.GetResourceString(GetResourceName(resource)));
 }
Ejemplo n.º 14
0
 internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource)
 {
     throw new ObjectDisposedException(objectName, SR.GetResourceString(GetResourceName(resource)));
 }