다음을 통해 공유


SiteMapNode.GetExplicitResourceString(String, String, Boolean) 메서드

정의

지역화할 특성, 리소스를 찾을 수 없는 경우 반환할 기본 문자열 및 리소스가 없는 경우 예외를 throw할지 여부를 나타내는 부울 값을 기반으로 SiteMapNode 지역화된 문자열을 검색합니다.

protected:
 System::String ^ GetExplicitResourceString(System::String ^ attributeName, System::String ^ defaultValue, bool throwIfNotFound);
protected string GetExplicitResourceString(string attributeName, string defaultValue, bool throwIfNotFound);
member this.GetExplicitResourceString : string * string * bool -> string
Protected Function GetExplicitResourceString (attributeName As String, defaultValue As String, throwIfNotFound As Boolean) As String

매개 변수

attributeName
String

SiteMapNode 지역화할 특성입니다.

defaultValue
String

일치하는 리소스를 찾을 수 없는 경우 반환할 기본값입니다.

throwIfNotFound
Boolean

true에 대해 nullattributeNamedefaultValue 명시적 리소스가 정의되고 지역화된 값을 찾을 수 없으면 를 throwInvalidOperationException합니다. 그렇지 않으면 . false

반환

지역화된 특성을 나타내는 문자열입니다.

예외

attributeNamenull입니다.

일치하는 리소스 개체를 찾을 수 없습니다.throwIfNotFoundtrue

설명

메서드는 GetExplicitResourceString 속성, Descriptionget 속성 및 속성에 정의된 모든 사용자 지정 특성의 Title 접근자에서 Attributes 호출됩니다. SiteMapProvider 메서드가 지역화된 문자열을 SiteMapNode 반환하려면 true 추적되는 개체의 속성이 GetExplicitResourceString 설정되어 있어야 합니다EnableLocalization. 로 EnableLocalization 설정 false하면 지역화가 수행되지 않으며 메서드가 GetExplicitResourceString 호출되지 않습니다.

Title 속성, 속성 및 속성에 DescriptionAttributes 정의된 모든 사용자 지정 특성은 먼저 메서드를 GetImplicitResourceString 호출합니다. 반환 nullGetExplicitResourceString 되는 경우 메서드는 명시적 리소스 식에서 기본값의 값으로 defaultValue 설정된 상태에서 호출되고throwIfNotFound(정의된 것으로 가정) 로 설정됩니다true.

메모

클래스는 XmlSiteMapProvider 개체가 특성에 SiteMapNode 대한 암시적 리소스 식과 명시적 리소스 식을 모두 정의할 수 없다는 제한을 적용합니다. 그러나 사용자 지정 공급자 구현은 둘 다 허용하도록 선택할 수 있습니다.

이 메서드는 GetExplicitResourceString 개체가 NameValueCollection 초기화된 리소스 키 SiteMapNode 컬렉션을 사용합니다. 리소스 키 컬렉션을 지정하지 않으면 반환됩니다 GetExplicitResourceStringnull.

적용 대상

추가 정보