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;
}

注釈

この属性は、既定のタグ名をオーバーライドするために、メトリック クラスのフィールドまたはプロパティに適用されます。 既定では、タグ名はそれぞれのフィールドまたはプロパティと同じです。 この属性を使用すると、既定値をオーバーライドし、カスタム タグ名を指定できます。

コンストラクター

名前 説明
TagNameAttribute(String)

TagNameAttribute クラスの新しいインスタンスを初期化します。

プロパティ

名前 説明
Name

タグの名前を取得します。

適用対象