TagNameAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
厳密に型指定されたメトリックのタグ情報を提供します。
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
- 継承
- 属性
例
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 |
タグの名前を取得します。 |