GetResourceString() статический приватный Метод

static private GetResourceString ( string resourceKey, string defaultString ) : string
resourceKey string
defaultString string
Результат string
Пример #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));
                }
            }
Пример #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));
 }
Пример #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);
Пример #4
0
 private AppDomain()
 {
     throw new NotSupportedException(SR.GetResourceString(ResId.NotSupported_Constructor));
 }
Пример #5
0
 protected override string GetLocalizedString(string value)
 {
     return(SR.GetResourceString(value, ""));
 }
Пример #6
0
 internal static void ThrowNotSupportedException(ExceptionResource resource)
 {
     throw new NotSupportedException(SR.GetResourceString(GetResourceName(resource)));
 }
Пример #7
0
 internal static void ThrowUnauthorizedAccessException(ExceptionResource resource)
 {
     throw new UnauthorizedAccessException(SR.GetResourceString(GetResourceName(resource)));
 }
Пример #8
0
 internal static void ThrowSerializationException(ExceptionResource resource)
 {
     throw new SerializationException(SR.GetResourceString(GetResourceName(resource)));
 }
Пример #9
0
 internal static void  ThrowSecurityException(ExceptionResource resource)
 {
     throw new System.Security.SecurityException(SR.GetResourceString(GetResourceName(resource)));
 }
Пример #10
0
 internal static void ThrowInvalidOperationException(ExceptionResource resource)
 {
     throw new InvalidOperationException(SR.GetResourceString(GetResourceName(resource)));
 }
Пример #11
0
 internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
 {
     throw new ArgumentOutOfRangeException(GetArgumentName(argument),
                                           SR.GetResourceString(GetResourceName(resource)));
 }
Пример #12
0
 internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument)
 {
     throw new ArgumentException(SR.GetResourceString(GetResourceName(resource)), GetArgumentName(argument));
 }
Пример #13
0
 internal static void ThrowArgumentException(ExceptionResource resource)
 {
     throw new ArgumentException(SR.GetResourceString(GetResourceName(resource)));
 }
Пример #14
0
 internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource)
 {
     throw new ObjectDisposedException(objectName, SR.GetResourceString(GetResourceName(resource)));
 }