HelpKeywordAttribute 클래스

정의

클래스 또는 멤버의 컨텍스트 키워드를 지정합니다. 이 클래스는 상속될 수 없습니다.

public ref class HelpKeywordAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=false, Inherited=false)]
public sealed class HelpKeywordAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=false, Inherited=false)]
[System.Serializable]
public sealed class HelpKeywordAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=false, Inherited=false)>]
type HelpKeywordAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=false, Inherited=false)>]
[<System.Serializable>]
type HelpKeywordAttribute = class
    inherit Attribute
Public NotInheritable Class HelpKeywordAttribute
Inherits Attribute
상속
HelpKeywordAttribute
특성

예제

다음 코드 예제에서는 멤버 자체에 특성을 배치 하 여이 도움말 시스템 동작을 재정의 하는 방법을 보여 주세요. 이러한 키워드는 라는 다음 클래스의 키워드입니다 DemoComponent.

  • 클래스 키워드(keyword): "System.ComponentModel.Component" (DemoNamespace.DemoComponent)

  • Property1 키워드(keyword): "DemoNamespace.DemoComponent.Property1"(기본값)

  • Property2 키워드(keyword): "SomeNamespace.SomeOtherClass.Property2" (DemoNamespace.DemoComponent.Property2)

[HelpKeywordAttribute(typeof(Component))]  
public class DemoComponent : Component  
{  
    public string Property1  
    {  
        get  
        {  
            return "";  
        }  
    }  

    [HelpKeywordAttribute("SomeNamespace.SomeOtherClass.Property2")]  
    public string Property2  
    {  
        get  
        {  
            return "";  
        }  
    }  
}  

다음 코드 예제를 사용 하 여 HelpKeywordAttribute 설명 합니다 컨텍스트 키워드(keyword) 지정 하는 클래스입니다. 이 코드 예제에 대한 전체 설명은 방법: Windows Forms 컨트롤에서 특성 적용을 참조하세요.

// This control demonstrates a simple logging capability. 
[ComplexBindingProperties("DataSource", "DataMember")]
[DefaultBindingProperty("TitleText")]
[DefaultEvent("ThresholdExceeded")]
[DefaultProperty("Threshold")]
[HelpKeywordAttribute(typeof(UserControl))]
[ToolboxItem("System.Windows.Forms.Design.AutoSizeToolboxItem,System.Design")]
public class AttributesDemoControl : UserControl
{
' This control demonstrates a simple logging capability. 
<ComplexBindingProperties("DataSource", "DataMember"), _
DefaultBindingProperty("TitleText"), _
DefaultEvent("ThresholdExceeded"), _
DefaultProperty("Threshold"), _
HelpKeywordAttribute(GetType(UserControl)), _
ToolboxItem("System.Windows.Forms.Design.AutoSizeToolboxItem,System.Design")> _
Public Class AttributesDemoControl
    Inherits UserControl

설명

기본적으로 클래스에 대한 도움말 키워드(keyword) 속성 값으로 Type.FullName 제공됩니다. 멤버의 경우 도움말 키워드(keyword) 속성을 선언한 형식의 전체 이름과 속성 이름 자체에 의해 지정됩니다.

예를 들어 컨트롤의 Control.Text 속성을 고려합니다 System.Windows.Forms.Button . 클래스 키워드(keyword) "System.Windows.Forms. Button"이지만 Control.Text 속성 키워드(keyword) "System.Windows.Forms. Control.Text"는 속성이 Control.Text 클래스 자체가 아니라 System.Windows.Forms.Button 클래스에 System.Windows.Forms.Control 선언되므로 클래스는 System.Windows.Forms.Button 속성을 상속합니다.

반면에 Button.DialogResult 속성은 클래스에서 System.Windows.Forms.Button 선언되므로 해당 키워드(keyword) "System.Windows.Forms. Button.DialogResult".

도움말 시스템에서 키워드를 가져오면 먼저 를 확인 HelpKeywordAttribute합니다. 클래스 수준에서 는 로 지정된 문자열을 반환합니다 HelpKeywordAttribute. 이는 선언 형식의 실제 전체 이름과 멤버 이름을 계속 반영하는 해당 형식의 멤버에 사용되지 않습니다. 이 특성은 공통 설명서와 관련이 있지만 고유한 도움말 ID가 있는 강력한 형식의 클래스를 지원합니다.

생성자

HelpKeywordAttribute()

HelpKeywordAttribute 클래스의 새 인스턴스를 초기화합니다.

HelpKeywordAttribute(String)

HelpKeywordAttribute 클래스의 새 인스턴스를 초기화합니다.

HelpKeywordAttribute(Type)

제공된 형식에서 HelpKeywordAttribute 클래스의 새 인스턴스를 초기화합니다.

필드

Default

HelpKeywordAttribute의 기본값을 나타냅니다. 이 필드는 읽기 전용입니다.

속성

HelpKeyword

이 특성이 제공하는 도움말 키워드를 가져옵니다.

TypeId

파생 클래스에서 구현된 경우 이 Attribute에 대한 고유 식별자를 가져옵니다.

(다음에서 상속됨 Attribute)

메서드

Equals(Object)

두 개의 HelpKeywordAttribute 인스턴스가 같은지 여부를 확인합니다.

GetHashCode()

이 인스턴스의 해시 코드를 반환합니다.

GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
IsDefaultAttribute()

도움말 키워드가 null인지 여부를 확인합니다.

Match(Object)

파생 클래스에서 재정의된 경우 이 인스턴스가 지정된 개체와 같은지 여부를 나타내는 값을 반환합니다.

(다음에서 상속됨 Attribute)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

이름 집합을 해당하는 디스패치 식별자 집합에 매핑합니다.

(다음에서 상속됨 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다.

(다음에서 상속됨 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

개체에서 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1).

(다음에서 상속됨 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

개체에서 노출하는 메서드와 속성에 대한 액세스를 제공합니다.

(다음에서 상속됨 Attribute)

적용 대상