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

정의

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

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

attributeName에 대해 명시적 리소스가 정의되어 있고 defaultValuetrue이고 지역화된 값이 없는 경우 InvalidOperationException을 throw하려면 null이고, 그렇지 않으면 false입니다.

반환

String

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

예외

attributeName이(가) null인 경우

일치하는 리소스 개체를 찾을 수 없고 throwIfNotFoundtrue인 경우

설명

GetExplicitResourceString 메서드가 호출 되는 get 의 접근자는 Title 속성인을 Description 속성과에 정의 된 모든 사용자 지정 특성은 Attributes 속성. 합니다 SiteMapProvider 개체를 SiteMapNode 추적 됩니다 있어야 해당 EnableLocalization 속성이로 설정 true 에 대 한는 GetExplicitResourceString 지역화 된 문자열을 반환 하는 방법. 경우는 EnableLocalization 로 설정 된 false, 지역화 수행 되지 않습니다 및 GetExplicitResourceString 메서드 호출 되지 않습니다.

Title 속성을 Description 속성과에 정의 된 모든 사용자 지정 특성을 Attributes 속성 먼저 호출를 GetImplicitResourceString 메서드. 반환 하는 경우 nullGetExplicitResourceString 메서드가 호출 됩니다 defaultValue (정의 된 것으로 가정) 명시적 리소스 식이에서 기본값의 값으로 설정 하 고 throwIfNotFoundtrue합니다.

참고

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

합니다 GetExplicitResourceString 메서드를 NameValueCollection 컬렉션 리소스의 키를 SiteMapNode 개체를 초기화 합니다. 리소스 키의 컬렉션을 지정 하지 않은 경우는 GetExplicitResourceString 반환 null합니다.

적용 대상

추가 정보