TagNameAttribute 클래스

정의

강력한 형식의 메트릭에 대한 태그 정보를 제공합니다.

public ref class TagNameAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
public sealed class TagNameAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
type TagNameAttribute = class
    inherit Attribute
Public NotInheritable Class TagNameAttribute
Inherits Attribute
상속
TagNameAttribute
특성

예제

public class MyStrongTypeMetric
{
    [TagName("tag_name_as_per_some_convention1")]
    public string Name1 { get; set; }

    [TagName("tag_name_as_per_some_convention2")]
    public string Name2;
}

설명

이 특성은 기본 태그 이름을 재정의하기 위해 메트릭 클래스의 필드 또는 속성에 적용됩니다. 기본적으로 태그 이름은 해당 필드 또는 속성과 동일합니다. 이 특성을 사용하여 기본값을 재정의하고 사용자 지정 태그 이름을 제공할 수 있습니다.

생성자

Name Description
TagNameAttribute(String)

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

속성

Name Description
Name

태그의 이름을 가져옵니다.

적용 대상