GetResourceString() static private method

static private GetResourceString ( string resourceKey, string defaultString ) : string
resourceKey string
defaultString string
return string
コード例 #1
0
ファイル: Guid.cs プロジェクト: Amortless/corert
            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
ファイル: Environment.cs プロジェクト: masums/coreclr
 // 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
ファイル: AppDomain.cs プロジェクト: ApInvent/coreclr
 private AppDomain()
 {
     throw new NotSupportedException(SR.GetResourceString(ResId.NotSupported_Constructor));
 }
コード例 #5
0
ファイル: misc.cs プロジェクト: zhiliangxu/corefx
 protected override string GetLocalizedString(string value)
 {
     return(SR.GetResourceString(value, ""));
 }
コード例 #6
0
ファイル: ThrowHelper.cs プロジェクト: DnlHarvey/corert
 internal static void ThrowNotSupportedException(ExceptionResource resource)
 {
     throw new NotSupportedException(SR.GetResourceString(GetResourceName(resource)));
 }
コード例 #7
0
ファイル: ThrowHelper.cs プロジェクト: DnlHarvey/corert
 internal static void ThrowUnauthorizedAccessException(ExceptionResource resource)
 {
     throw new UnauthorizedAccessException(SR.GetResourceString(GetResourceName(resource)));
 }
コード例 #8
0
ファイル: ThrowHelper.cs プロジェクト: DnlHarvey/corert
 internal static void ThrowSerializationException(ExceptionResource resource)
 {
     throw new SerializationException(SR.GetResourceString(GetResourceName(resource)));
 }
コード例 #9
0
ファイル: ThrowHelper.cs プロジェクト: DnlHarvey/corert
 internal static void  ThrowSecurityException(ExceptionResource resource)
 {
     throw new System.Security.SecurityException(SR.GetResourceString(GetResourceName(resource)));
 }
コード例 #10
0
ファイル: ThrowHelper.cs プロジェクト: DnlHarvey/corert
 internal static void ThrowInvalidOperationException(ExceptionResource resource)
 {
     throw new InvalidOperationException(SR.GetResourceString(GetResourceName(resource)));
 }
コード例 #11
0
ファイル: ThrowHelper.cs プロジェクト: DnlHarvey/corert
 internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
 {
     throw new ArgumentOutOfRangeException(GetArgumentName(argument),
                                           SR.GetResourceString(GetResourceName(resource)));
 }
コード例 #12
0
ファイル: ThrowHelper.cs プロジェクト: DnlHarvey/corert
 internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument)
 {
     throw new ArgumentException(SR.GetResourceString(GetResourceName(resource)), GetArgumentName(argument));
 }
コード例 #13
0
ファイル: ThrowHelper.cs プロジェクト: DnlHarvey/corert
 internal static void ThrowArgumentException(ExceptionResource resource)
 {
     throw new ArgumentException(SR.GetResourceString(GetResourceName(resource)));
 }
コード例 #14
0
ファイル: ThrowHelper.cs プロジェクト: DnlHarvey/corert
 internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource)
 {
     throw new ObjectDisposedException(objectName, SR.GetResourceString(GetResourceName(resource)));
 }